From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7668 invoked by alias); 8 Apr 2008 13:08:30 -0000 Received: (qmail 7655 invoked by uid 22791); 8 Apr 2008 13:08:29 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO nimbus.ott.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 08 Apr 2008 13:07:53 +0000 Received: by nimbus.ott.qnx.com with Internet Mail Service (5.5.2653.19) id <2FVR75J3>; Tue, 8 Apr 2008 09:07:51 -0400 Message-ID: <47FB6E21.8000002@qnx.com> From: Aleksandar Ristovski To: Doug Evans Cc: GDB Patches Subject: Re: [RFA] patch for DW_AT_comp_dir/DW_AT_name vs .debug_line inco nsistencies Date: Tue, 08 Apr 2008 16:37:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) user-agent: Thunderbird 2.0.0.12 (Windows/20080213) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C89979.8B2A916D" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-04/txt/msg00154.txt.bz2 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C89979.8B2A916D Content-Type: text/plain; charset="iso-8859-1" Content-length: 779 Doug Evans wrote: > I have an occasion to revisit this: > http://sourceware.org/ml/gdb-patches/2007-11/msg00314.html > > Or in a different form: > http://sourceware.org/ml/gdb-patches/2008-01/msg00103.html > > When we last left our story, watching for a single path mismatch of > the main source file only seemed ok. That's what this patch does. > It's just a minor revision of > http://sourceware.org/ml/gdb-patches/2008-01/msg00103.html > > Hello Doug, Without going through your revisited patch: I have been using a patch based on your initial patch and it seems to work fine, with one exception, there is one problem in your patch - fixed with the diff attached. I think the code comment is self-explanatory. Thanks, --- Aleksandar Ristovski QNX Software Systems ------_=_NextPart_000_01C89979.8B2A916D Content-Type: text/plain; name="dwarf2read.doug.diff" Content-Disposition: attachment; filename="dwarf2read.doug.diff" Content-length: 867 Index: gdb/dwarf2read.c =================================================================== --- gdb/dwarf2read.c (revision 99) +++ gdb/dwarf2read.c (revision 115) @@ -6988,7 +6988,16 @@ dwarf_decode_lines (struct line_header * read_unsigned_leb128 (abfd, line_ptr, &bytes_read); line_ptr += bytes_read; add_file_name (lh, cur_file, dir_index, mod_time, length); - } + if (!decode_for_pst_p) + { + /* Re-create subfile_names. We created it initially + assuming lh->file_names is final, but now that + it changed, we need to rebuild. */ + subfile_names = dwarf_build_subfile_names ( + lh, cu_file_name, comp_dir); + make_cleanup (dwarf_free_subfile_names, subfile_names); + } + } break; default: complaint (&symfile_complaints, ------_=_NextPart_000_01C89979.8B2A916D--