This is the mail archive of the
mailing list for the binutils project.
Re: Mixing 32-bit and 64-bit DWARF2/3 sections
On Sun, Nov 07, 2004 at 05:28:41PM +0100, Mark Kettenis wrote:
> Date: Sun, 7 Nov 2004 10:31:44 -0500
> From: Daniel Jacobowitz <email@example.com>
> On Sun, Nov 07, 2004 at 03:28:07PM +0100, Mark Kettenis wrote:
> > Currently GDB barfs when you use it on an executable that contains
> > compilation units that mix 32-bit and 64-bit DWARF sections. Looking
> > at the (latest?) DWARF3 draft it doesn't seem to be unreasonable that
> > it does so:
> > "The 32-bit and 64-bit DWARF format conventions must not be
> > intermixed within a single compilation unit."
> I'd read that as saying that GDB should support what you describe.
> This isn't mixing them within a single compilation unit. What falls
> No I'm really talking about mixing 32-bit and 64-bit DWARF format
> within the same compilation unit. In the case of OpenBSD/mips64 GCC
> generates a 32-bit .debug_info section and .file directives that
> contain the line info. These .file directives are then converted by
> gas into 64-bit .debug_line sections.
> When GDB reads these it dumps core. I'm working on patches to fix
> this, but I'm not yet completely satisfied with them.
Ah! I understand now, thanks.
I think GDB should complain noisily about this. One nice fix to this
in gas would be for it to detect the format of .debug_info and match it
when generating .debug_line. Another would be to add command line
options for 32-bit and 64-bit .debug_line and make GCC instruct it on
which to use - that's a bit more complicated to implement.