From: Jim Blandy <jimb@redhat.com>
To: David Carlton <carlton@math.stanford.edu>,
Andrew Cagney <ac131313@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: dwarf2_build_psymtabs should check that .debug_line exists
Date: Wed, 14 Aug 2002 16:47:00 -0000 [thread overview]
Message-ID: <vt21y91ui4n.fsf@zenia.red-bean.com> (raw)
In-Reply-To: <ro1wuquifvd.fsf@jackfruit.Stanford.EDU>
This looks good to me.
Andrew, I can't get a fresh copy of copyright.list; is David in there
yet?
David Carlton <carlton@math.stanford.edu> writes:
> In article <vt24rdyze50.fsf@zenia.red-bean.com>, Jim Blandy <jimb@zenia.red-bean.com> writes:
>
> > It looks to me like read_file_scope shouldn't call dwarf_decode_macros
> > either when line_header is zero. Could you add that to your patch,
> > and re-post it?
>
> Oh, right, good call. Here it is; no new regressions.
>
> David Carlton
> carlton@math.stanford.edu
>
> 2002-08-13 David Carlton <carlton@math.stanford.edu>
>
> * dwarf2read.c (dwarf2_build_psymtabs): Check that
> dwarf_line_offset is nonzero before creating dwarf_line_buffer.
> (read_file_scope): Check that line_header is nonzero before
> decoding macro information.
>
> Index: dwarf2read.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/dwarf2read.c,v
> retrieving revision 1.64
> diff -u -p -r1.64 dwarf2read.c
> --- dwarf2read.c 31 Jul 2002 22:35:30 -0000 1.64
> +++ dwarf2read.c 13 Aug 2002 21:30:02 -0000
> @@ -1009,9 +1009,13 @@ dwarf2_build_psymtabs (struct objfile *o
> dwarf_abbrev_buffer = dwarf2_read_section (objfile,
> dwarf_abbrev_offset,
> dwarf_abbrev_size);
> - dwarf_line_buffer = dwarf2_read_section (objfile,
> - dwarf_line_offset,
> - dwarf_line_size);
> +
> + if (dwarf_line_offset)
> + dwarf_line_buffer = dwarf2_read_section (objfile,
> + dwarf_line_offset,
> + dwarf_line_size);
> + else
> + dwarf_line_buffer = NULL;
>
> if (dwarf_str_offset)
> dwarf_str_buffer = dwarf2_read_section (objfile,
> @@ -1808,7 +1812,7 @@ read_file_scope (struct die_info *die, s
> header, so we can only read it if we've read the header
> successfully. */
> attr = dwarf_attr (die, DW_AT_macro_info);
> - if (attr)
> + if (attr && line_header)
> {
> unsigned int macro_offset = DW_UNSND (attr);
> dwarf_decode_macros (line_header, macro_offset,
next prev parent reply other threads:[~2002-08-14 23:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-07 16:53 david carlton
2002-08-13 13:50 ` Jim Blandy
2002-08-13 14:54 ` David Carlton
2002-08-14 16:47 ` Jim Blandy [this message]
2002-08-19 16:43 ` David Carlton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vt21y91ui4n.fsf@zenia.red-bean.com \
--to=jimb@redhat.com \
--cc=ac131313@redhat.com \
--cc=carlton@math.stanford.edu \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox