This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: two gdb porting questions
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Jan Hoogerbrugge <hoogerbrugge at hotmail dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Sun, 26 Jan 2003 11:21:48 -0500
- Subject: Re: two gdb porting questions
- References: <F1482Np2VSAuzUreQii0000782f@hotmail.com>
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