This is the mail archive of the gdb@sourceware.org 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]

RE: Problem in porting GDB


Hi 

  	Thanks for your reply. I have made some changes in dwarf2read.c
in "process_full_comp_unit" ,  and it is now working fine for single
step, step  over etc for the memory model I discussed in previous mail.
Also this is completely target dependant stuff, hopefully won't affect
any other targets. 
	
	But what I  observed is that, suppose I put a breakpoint on main
and then issue run command,  it is showing breakpoint  at _main()
.Ideally it should show "break point at main()". Same thing happens if I
put breakpoint on any other function. So though we are able to step run
correctly through command line, but from insight it is going in
disassembly. GDB is not showing any local variables saying that it is
not in current context. 

Are these problems related to each other. 
Any help would be appreciated. 

Thanking in advance
Regards
Shrirang Khisti
KPIT Cummins Infosystems Ltd.
   
 

-----Original Message-----
From: jimblandy@gmail.com [mailto:jimblandy@gmail.com] On Behalf Of Jim
Blandy
Sent: Wednesday, December 21, 2005 1:29 AM
To: Shrirang Khishti
Cc: gdb@sources.redhat.com
Subject: Re: Problem in porting GDB

In cases like this, you will need your address size (as used in Dwarf
information) to be three bytes, or perhaps four.  This is a GCC
change.  Then, your foo_gdbarch_init function should call
set_gdbarch_addr_bit (..., 24), but since your pointers are 16 bits
long, it should then call set_gdbarch_ptr_bit (..., 16).

In GDB, an "address" is something that indexes all memory available on
the target.  Even if you have separate code and data spaces, you
assign each of them distinct ranges in some larger, imaginary, unified
address space.  This allows functions like read_memory to access any
memory on the system.  In contrast, a "pointer" is a value that uses
the same representation that pointers use in your program.  You can
define ADDRESS_TO_POINTER and POINTER_TO_ADDRESS methods to convert
between the two.  CORE_ADDR holds an address; we use 'struct value' to
store pointers.

This terminology isn't strictly followed in all comments; GDB is old
code.  But that's the discipline that I think our embedded support
tends to favor.


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