Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch/rfc] Recognize non-DW_AT_location <value optimized out> 	symbols
Date: Thu, 26 Mar 2009 00:38:00 -0000	[thread overview]
Message-ID: <20090326002940.GI9472@adacore.com> (raw)
In-Reply-To: <20090325090154.GA22235@host0.dyn.jankratochvil.net>

Hi Jan,

> gdb/
> 2009-03-24  Joel Brobecker  <brobecker@adacore.com>
> 	    Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	Recognize missing DW_AT_location as <value optimized out>.
> 	* dwarf2read.c
> 	(new_symbol <DW_TAG_variable> <!DW_AT_location> <!DW_AT_external>):
> 	Call add_symbol_to_list.

I don't understand what you are trying to explain in your comment.
The way I came to the conclusion that we shouldn't create a symbol
for DIEs that have a non-zero DW_AT_declaration is that the DWARF
reference calls them as "incomplete, or non-defining" declarations.
As such, we don't have all the information about our variable yet,
and the absence of a DW_AT_location attribute can be normal. Normally,
the full definition should be provided elsewhere and this what we will
use to create the associated symbol.

In your comment, you are hinting at a C++ situation, so I'm guessing
that this situation is relevant to this thread and gave you a little bit
of trouble. Would you like to elaborate?

If you want to, we can commit the patch as is, with or without the
comment, and then work on a comment that we can both understand.
I would tend towards committing the patch without the comment. I'd
rather have no comment than a comment I don't understand.

> gdb/testsuite/
> 2009-03-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* gdb.dwarf2/dw2-noloc-main.c: New file.
> 	* gdb.dwarf2/dw2-noloc.S: New symbols matrix.
> 	(.text): Remove.
> 	(.data): New.
> 	(DW_AT_stmt_list, .debug_line, DW_AT_frame_base): Remove.
> 	(DW_AT_low_pc, DW_AT_high_pc): Reference `dw2-noloc-main.c'.
> 	(DW_TAG_subprogram func_cu1, noloc): Remove.
> 	(main): New.
> 	* gdb.dwarf2/dw2-noloc.exp: Use prepare_for_testing, compile also
> 	`dw2-noloc-main.c'.  Test the new DIEs from `dw2-noloc.S'.
> 	(file_symbols): New procedure.

This part looks OK to me as well.

-- 
Joel


  reply	other threads:[~2009-03-26  0:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16 21:15 Jan Kratochvil
2009-03-20 15:17 ` Joel Brobecker
2009-03-20 15:51   ` Joel Brobecker
2009-03-20 18:22     ` Jan Kratochvil
2009-03-20 18:39   ` Joel Brobecker
2009-03-20 18:51     ` [patch] Racy FAIL: gdb.base/auxv.exp + gdb.base/callfuncs.exp [Re: [patch/rfc] Recognize non-DW_AT_location <value optimized out> symbols] Jan Kratochvil
2009-03-20 19:54       ` Joel Brobecker
2009-03-20 21:54         ` Daniel Jacobowitz
2009-03-23 17:36         ` Joel Brobecker
2009-03-23 17:45           ` Jan Kratochvil
2009-03-23 22:52             ` Joel Brobecker
2009-03-24 23:50               ` [patch/rfc] Recognize non-DW_AT_location <value optimized out> symbols [Re: [patch] Racy FAIL: gdb.base/auxv.exp + gdb.base/callfuncs.exp] Jan Kratochvil
2009-03-25 10:03                 ` [patch/rfc] Recognize non-DW_AT_location <value optimized out> symbols Jan Kratochvil
2009-03-26  0:38                   ` Joel Brobecker [this message]
2009-03-26 17:02                     ` Jan Kratochvil
2009-03-20 19:18     ` Joel Brobecker

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=20090326002940.GI9472@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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