* two gdb porting questions
@ 2003-01-24 14:24 Jan Hoogerbrugge
2003-01-25 22:10 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Jan Hoogerbrugge @ 2003-01-24 14:24 UTC (permalink / raw)
To: gdb
Dear all,
I am porting gdb to a new target and I can use some help. I am having
the following questions:
* How to find out whether there is a symbol at a memory address in
opcodes/xxx-dis.c? Info->symbol_at_address_func does not work. It
returns always 1.
* I want to use stabs to pass frame information from my compiler to
gdb. Which stab number(s) should I use for this? How do I get this
information in my xxx-tdep.c given the start address of the
function? (I use ELF in the case that matters)
Thanks!
Jan
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: two gdb porting questions
2003-01-24 14:24 two gdb porting questions Jan Hoogerbrugge
@ 2003-01-25 22:10 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-01-25 22:10 UTC (permalink / raw)
To: Jan Hoogerbrugge; +Cc: gdb
On Fri, Jan 24, 2003 at 03:18:13PM +0100, Jan Hoogerbrugge wrote:
> Dear all,
>
> I am porting gdb to a new target and I can use some help. I am having
> the following questions:
>
> * How to find out whether there is a symbol at a memory address in
> opcodes/xxx-dis.c? Info->symbol_at_address_func does not work. It
> returns always 1.
>
> * I want to use stabs to pass frame information from my compiler to
> gdb. Which stab number(s) should I use for this? How do I get this
> information in my xxx-tdep.c given the start address of the
> function? (I use ELF in the case that matters)
Is it absolutely necessary that you use stabs? There are clean ways to
express this information in DWARF-2, and if you're using ELF, there's
really no excuse.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: two gdb porting questions
@ 2003-01-26 10:50 Jan Hoogerbrugge
2003-01-26 16:21 ` Daniel Jacobowitz
0 siblings, 1 reply; 4+ messages in thread
From: Jan Hoogerbrugge @ 2003-01-26 10:50 UTC (permalink / raw)
To: drow; +Cc: gdb
>From: Daniel Jacobowitz <drow@mvista.com>
> > * I want to use stabs to pass frame information from my compiler to
> > gdb. Which stab number(s) should I use for this? How do I get this
> > information in my xxx-tdep.c given the start address of the
> > function? (I use ELF in the case that matters)
>
>Is it absolutely necessary that you use stabs? There are clean ways to
>express this information in DWARF-2, and if you're using ELF, there's
>really no excuse.
My compiler (which is not gcc) happens to generate stabs. So I have to do it
with stabs. Currently the compiler misuses a N_ROSYM to pass frame info to
its debugger. However, gdb does not like this.
Are there other targets where a stab is used for frame information?
The instruction format of the debug target is so complex that decoding the
prologue is not a real option.
Cheers,
Jan
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: two gdb porting questions
2003-01-26 10:50 Jan Hoogerbrugge
@ 2003-01-26 16:21 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2003-01-26 16:21 UTC (permalink / raw)
To: Jan Hoogerbrugge; +Cc: gdb
On Sun, Jan 26, 2003 at 11:50:55AM +0100, Jan Hoogerbrugge wrote:
> >From: Daniel Jacobowitz <drow@mvista.com>
>
> >> * I want to use stabs to pass frame information from my compiler to
> >> gdb. Which stab number(s) should I use for this? How do I get this
> >> information in my xxx-tdep.c given the start address of the
> >> function? (I use ELF in the case that matters)
> >
> >Is it absolutely necessary that you use stabs? There are clean ways to
> >express this information in DWARF-2, and if you're using ELF, there's
> >really no excuse.
>
> My compiler (which is not gcc) happens to generate stabs. So I have to do
> it with stabs. Currently the compiler misuses a N_ROSYM to pass frame info
> to its debugger. However, gdb does not like this.
>
> Are there other targets where a stab is used for frame information?
>
> The instruction format of the debug target is so complex that decoding the
> prologue is not a real option.
We did something similar for an unpublished port; as a local hack it
wasn't too bad and we did it just about the same way you're describing.
You just stuff the value in a new field in the symbol struct.
Eventually we arranged to generate DWARF-2 instead, though, and it went
away.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-26 16:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-24 14:24 two gdb porting questions Jan Hoogerbrugge
2003-01-25 22:10 ` Daniel Jacobowitz
2003-01-26 10:50 Jan Hoogerbrugge
2003-01-26 16:21 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox