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]

gdb Flow


Hello Group,

   we have developed a new processor and have got a version of
gcc(3.2)(including gdb) ported to this machine by an external agency.
Here we have a problem:

Our processor is a 16-bit processor (i.e. address X is 16-bits away from
address X+1). An char and integer are 16-bits long each and a pointer is
32-bits long. In the course of using our new gdb, we observed that
whenever we are printing the value of a pointer variable, we are getting
wrong values. I tried to figure out the reason and found the following:
1. Suppose that a variable exists in memory location 0x10000057 (our
data section starts from 0x10000000 followed by BSS, HEAP(64k) and
STACK) and a pointer is assigned the address of the variable.
2. But if I print the value of the pointer, it shows only 0x57 instead
of 0x10000057.
3. So, instead of fetching the value from 0x10000057, gdb is fetching
the value from 0x57.

Added to this, our vendors stopped the support as their contract ceased
and I now have the responsibility of fixing this bug. For this, I want
to know the internal flow of gdb, what functions are called (in which
sequence) in general when we issue a "print *ptr" command at gdb prompt.
I've searched a lot on google but could not find anything that explains
this logical sequence and I finally found this to be my only hope. So, I
was wondering if anyone who has a good idea will be willing to help me
or atleast show me some guiding path.

Kind regards,
Sriharsha.

--
*****************************
* Sriharsha Vedurmudi			
* Software Engineer		
*
* Redpine Signals Inc.	
* Gate #395, Plot 87,88			
* Sagar Society, Road #2,
* Banjara Hills,		
* Hyderabad - 500 034			
* www.redpinesignals.com	
*							
* +91-40-23559911  (Office)
* +91-98851-37338  (Mobile)
*****************************




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