many errors trying to enable debug with uniata driver

All development related issues welcome

Moderator: Moderator Team

Post Reply
dufresnep
Posts: 3
Joined: Mon May 02, 2022 6:47 pm

many errors trying to enable debug with uniata driver

Post by dufresnep »

I did:

Code: Select all

diff --git a/drivers/storage/ide/uniata/atapi.h b/drivers/storage/ide/uniata/atapi.h
index 3939d1ce46f..72ae0df40b8 100644
--- a/drivers/storage/ide/uniata/atapi.h
+++ b/drivers/storage/ide/uniata/atapi.h
@@ -44,6 +44,8 @@ Licence:
 
 
 --*/
+#define _DBGNT_
+
 #ifndef __GLOBAL_H__
 #define __GLOBAL_H__
 
@@ -52,13 +54,13 @@ extern "C" {
 #endif //__cplusplus
 
 #ifndef USER_MODE
-#include "config.h"
 #endif //USER_MODE
 
 #include "scsi.h"
 #include "stdio.h"
 #include "string.h"
 
+#define _DEBUG
 #ifdef _DEBUG
 
 
(END)

I get 732k of errors like:
KdPrint3((PRINT_PREFIX "ReadChannelPort4 ch%d[%x] = %x\n", chan->lChannel,
io_port_ndx, v));
^~~~~~~~~~~~
PUINT_PTR
../drivers/storage/ide/uniata/id_sata.h:296:27: error: expected ')' before string constant
KdPrint3((PRINT_PREFIX "ReadChannelPort4 ch%d[%x] = %x\n", chan->lChannel, io_port_ndx, v));
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)
../drivers/storage/ide/uniata/id_sata.h: In function 'void UniataAhciWriteChannelPort4(PHW_CHANNEL, ULONG, ULONG)':
../drivers/storage/ide/uniata/id_sata.h:308:15: error: 'PRINT_PREFIX' was not declared in this scope
KdPrint3((PRINT_PREFIX "WriteChannelPort4 %x => ch%d[%x]\n", data, chan->lChannel, io_port_ndx));
^~~~~~~~~~~~

...
../drivers/storage/ide/uniata/id_sata.h:421:15: note: suggested alternative: 'PUINT_PTR'
KdPrint2((PRINT_PREFIX "imp: %#x & %#x\n", (deviceExtension)->AHCI_PI, (1<<c) ));
^~~~~~~~~~~~
PUINT_PTR
../drivers/storage/ide/uniata/id_sata.h:421:27: error: expected ')' before string constant
KdPrint2((PRINT_PREFIX "imp: %#x & %#x\n", (deviceExtension)->AHCI_PI, (1<<c) ));
~ ^~~~~~~~~~~~~~~~~~~
Last edited by dufresnep on Mon May 02, 2022 7:02 pm, edited 1 time in total.
dufresnep
Posts: 3
Joined: Mon May 02, 2022 6:47 pm

Re: many errors trying to enable debug with uniata driver

Post by dufresnep »

#include "config.h"
was removed by mistake... trying reintegrating it.
dufresnep
Posts: 3
Joined: Mon May 02, 2022 6:47 pm

Re: many errors trying to enable debug with uniata driver

Post by dufresnep »

With:

Code: Select all

paul@bismark:~/reactos$ git diff drivers/storage/ide/uniata/
diff --git a/drivers/storage/ide/uniata/CMakeLists.txt b/drivers/storage/ide/uniata/CMakeLists.txt
index 6b9cdcff5e9..14d562329d7 100644
--- a/drivers/storage/ide/uniata/CMakeLists.txt
+++ b/drivers/storage/ide/uniata/CMakeLists.txt
@@ -4,7 +4,7 @@ include_directories(
     BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
     inc)
 
-#add_definitions(-D_DEBUG)
+add_definitions(-D_DEBUG)
 
 list(APPEND SOURCE
diff --git a/drivers/storage/ide/uniata/CMakeLists.txt b/drivers/storage/ide/un
iata/CMakeLists.txt
index 6b9cdcff5e9..14d562329d7 100644
--- a/drivers/storage/ide/uniata/CMakeLists.txt
+++ b/drivers/storage/ide/uniata/CMakeLists.txt
@@ -4,7 +4,7 @@ include_directories(
     BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
     inc)
 
-#add_definitions(-D_DEBUG)
+add_definitions(-D_DEBUG)
 
 list(APPEND SOURCE
     atacmd_map.cpp
diff --git a/drivers/storage/ide/uniata/atapi.h b/drivers/storage/ide/uniata/atapi.h
index 3939d1ce46f..426f651b068 100644
--- a/drivers/storage/ide/uniata/atapi.h
+++ b/drivers/storage/ide/uniata/atapi.h
@@ -44,6 +44,8 @@ Licence:
 
 
 --*/
+//#define _DBGNT_
+
 #ifndef __GLOBAL_H__
 #define __GLOBAL_H__
 
@@ -59,6 +61,7 @@ extern "C" {
 #include "stdio.h"
 #include "string.h"
 
+//#define _DEBUG
 #ifdef _DEBUG
I now have an iso to try.
And it works: showing ata debug messages!
Last edited by dufresnep on Mon May 02, 2022 7:24 pm, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests