This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem resolving symbol address


I hope this is the right mailing list for this query. I am using a port of
GDB 5.3 for the OpenCores OpenRISC processor. I have tried to get help from
the OpenCores mailing list but no luck so far. The problem I have is that
considering a simple program like:

unsigned long my_data;

void my_fun(void)
{
    /* Do something */
}

if I then do:

{gdb) print my_data

it says:

Address of symbol "my_data" is unknown.

I did 'maint print symbols symfile' and I noticed the following in
'symfile':

[snip]
block #000, object at 0x8307fc4, 1 buckets in 0x12cc..0x1340, compiled with
gcc2
 void my_fun(); block object 0x8307f28, 0x12cc..0x1340
 long unsigned int my_data; unresolved
[snip]

Under what conditions would it say the address for 'my_data' is unresolved?
All global variables are the same, whereas functions seem to be OK. I'm
guessing there is some sort of problem with either the OpenRISC port of GCC
not writing the symbol information correctly or the OpenRISC port of GDB not
reading the symbol information properly.

I'm not really an expert in either application, so any help to point me in
the right direction would be much appreciated.

TIA

Robert Cragie, Design Engineer
_______________________________________________________________
Jennic Ltd, Furnival Street, Sheffield, S1 4QT,  UK
http://www.jennic.com  Tel: +44 (0) 114 281 2655
_______________________________________________________________


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]