This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Artifical dwarf2 debug info
On Mon, Dec 16, 2002 at 02:58:18PM +0100, Michal Ludvig wrote:
> Daniel Jacobowitz wrote:
> >On Sun, Dec 15, 2002 at 01:48:12AM +0100, Michal Ludvig wrote:
> >
> >>this long patch provides a fix for a very annoying fact, that GDB on
> >>x86-64 can't do backtraces from hand-optimized assembler functions (that
> >>applies for example to glibc's memset, str*, etc as well as to syscall
> >>wrappers).
> >
> >Workaround, really - just for some particular functions...
>
> Yes, but still better than nothing ;-)
Yeah.
> OK, the attached patch has a modified gdbarch.sh and regenerated
> gdbarch.[ch].
>
> I've also put a description into gdbint.texinfo
OK, Eli will have to approve that part.
> >>OK to commit to branch and mainline?
> >
> >I do not believe this is appropriate for the branch, at least until
> >it's sat on mainline without causing problems for some time.
>
> It shouldn't cause any problems because all the machinery is invoked if
> and only if the target allowed it, and then if a FDE isn't found for a
> particular function. Typically only two or three times on x86-64 and
> zero times on other archs.
>
> Can I put it at least to mainline?
A little way to go yet. Please don't just export things from
dwarf2cfi:
> +/* Common Information Entry - holds information that is shared among many
> + Frame Descriptors. */
> +struct cie_unit
This is fine for now.
> +/* Frame Description Entry. */
> +struct fde_unit
> +{
So's this.
> +struct fde_array
> +{
> + struct fde_unit **array;
> + int elems;
> + int array_size;
> +};
> +
> +extern struct cie_unit *cie_chunks;
> +extern struct fde_array fde_chunks;
> +
But these aren't. Add a function to link a new FDE or CIE, please.
> +struct cie_unit *cie_unit_alloc (void);
> +struct fde_unit *fde_unit_alloc (void);
These make sense...
> +void fde_chunks_need_space (void);
> +int compare_fde_unit (const void *a, const void *b);
But these aren't necessary if you add said function.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer