Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-debug-dev] gdbPicl can't handle the main executable linked at 0x00000000

gcc will default program's text origin at 0x100000000
and data origin at 0x20000000 for data. But there are
no restrictions to prevent people to link their
programs at address 0x00000000 by using linker
options, for example, -Tdata 0x200000000 and
-Ttext0x10000000. 

Since gdbPicl code gets such information by issuing
gdb command "info file" before the program gets
loaded, so in it's "memory" 0x00000000 is starting 
address for text and data and so on. At later
time(after runToMain) when these addresses are used in
ModuleManager.containsAddress to check if an given
address(most likely will be 0x1XXXXXXXX) is contained
in any 0x00000000-0x00000XXX address ranges, we will
get "false". The reason for this is after "run" been
executed, the program got loaded and the it's text,
data and so on been relocated, in most cases text will
be loaded at 0x100000000. The fix for this should be:
make sure gdbPicl gets "info file" list after the
executable been loaded.

Linda





__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com


Back to the top