Board index » cppbuilder » BCB5 can't find source code of the DLL i'm debugging
Frédéric van der Plancke
![]() CBuilder Developer |
Frédéric van der Plancke
![]() CBuilder Developer |
BCB5 can't find source code of the DLL i'm debugging2007-03-09 10:28:01 PM cppbuilder57 BCB5 can't find the source code of the DLL i'm debugging. I only see the CPU window, and breakpoints in my source code fail to stop execution. This is on a new installation on my (somewhat) new machine. Debugging the same project used to work fine on my previous machine. The source code location changed from the old to the new machine. I've checked/tried all I could think of: - debug information on - host executable in the same directory than the DLL i am debugging - the exe loaded the right DLL - adding the path to my source code to the "debug symbols search path" (even though that shouldn't be needed AFAIK) Any idea ? Frédéric van der Plancke |
Clayton Arends
![]() CBuilder Developer |
2007-03-09 11:48:10 PM
Re:BCB5 can't find source code of the DLL i'm debuggingQuoteThis is on a new installation on my (somewhat) new machine. QuoteAny idea ? directory than the EXE but it is worth trying. Once your application has started switch to the IDE and type CTRL+ALT+M to load the "Modules" window. Then locate your DLL in this list, right click, and choose "Reload Symbol Table". If this fixes your problem then you might be witnessing the BCB5 + XP Debugging bug. - Clayton |
Frédéric van der Plancke
![]() CBuilder Developer |
2007-03-10 02:43:06 AM
Re:BCB5 can't find source code of the DLL i'm debugging
"Clayton Arends" < XXXX@XXXXX.COM >wrote in message
Quote>This is on a new installation on my (somewhat) new machine. Quote
I click "Reload Symbol Table" it asks for a path. Once the right path given (and symbols reloaded), source code debugging works fine (or so it seems, up to now...). It even continues to work after I stop and restart the debugged program, so I'm happy I don't have to reselect the path every time... Frédéric {smallsort} |
Clayton Arends
![]() CBuilder Developer |
2007-03-10 02:48:58 AM
Re:BCB5 can't find source code of the DLL i'm debugging
Good. You'll probably notice that you'll need to do that everytime you
close and reopen the IDE, unfortunately. - Clayton |
Dennis Jones
![]() CBuilder Developer |
2007-03-12 11:49:36 AM
Re:BCB5 can't find source code of the DLL i'm debugging
"Clayton Arends" < XXXX@XXXXX.COM >wrote in message
QuoteGood. You'll probably notice that you'll need to do that everytime you change the DLL's image base address to something other than the default, which is always 0x400000. The problem with the symbol tables comes from a change in how XP loads DLL's when there are address conflicts that cause a DLL to be relocated. Therefore, by avoiding relocation due to address conflicts, you can avoid the problem of the missing debug symbols altogether. A good range for DLL image base addresses is 0x60000000 - 0x70000000. If you have many DLL's, you will want to make sure you locate them so that they don't overlap, otherwise Windows will detect the conflict and relocate them, leaving you with the missing debug symbols again. Most of my DLL's are much smaller than 1MB, so I choose addresses on the 0x100000 boundary (e.g. 0x60100000, 0x60200000, etc.), which gives me 100 1-MB slots -- enough to avoid conflicts all the time. There was an article in Windows Developer's Journal back in December of 2000 that discussed the issue of DLL relocation, and source code was provided for a utility that would automatically relocate DLL's to an address within a specified address range based on a hash value computed from the DLL's file name. I have taken that source code and adapted it for BCB5. If anyone is interested in the executable (or even the source code), just let me know and I will be happy to make it available. - Dennis |