Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* dwarf2read.c:read_partial_die question
@ 2004-06-09 15:42 Bob Rossi
  2004-06-09 15:45 ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Bob Rossi @ 2004-06-09 15:42 UTC (permalink / raw)
  To: gdb

Hi,

I modified read_partial_die with my -file-list-exec-source-files patch.

I have this,
   4875  case DW_AT_name:
   4876
   4877    /* Prefer DW_AT_MIPS_linkage_name over DW_AT_name.  */
   4878    if (part_die->name == NULL)
   4879      part_die->name = DW_STRING (&attr);
   4880    break;
   4881  case DW_AT_comp_dir:
   4882    if (part_die->dirname == NULL)
   4883      part_die->dirname = DW_STRING (&attr);
   4884    break;

So, the question is, part_die->name is NULL and part_die->dirname is
NULL. Is this OK? Why would the name or the dirname of the file be NULL?


This is the comment in the testcase (twice.exp) that is producing this
behavior
       # Test that GDB can still detect whether we have line numbers
       # even if we're executing code in an include file.

This is what the dwarf2 spec says,
   A DW_AT_comp_dir attribute whose value is a null-terminated string
   containing the current
   working directory of the compilation command that produced this
   compilation unit in
   whatever form makes sense for the host system.
   The suggested form for the value of the DW_AT_comp_dir attribute on
   UNIX systems is
   hostname:pathname. If no hostname is available, the suggested form is
   :pathname.

Basically, it doens't say anything about it being NULL.

So, what I want to know is, is it valid that the value of part_die->dirname is
NULL and that the value of part_die->name is NULL?

Thanks,
Bob Rossi


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-06-09 17:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-09 15:42 dwarf2read.c:read_partial_die question Bob Rossi
2004-06-09 15:45 ` Daniel Jacobowitz
2004-06-09 16:06   ` Bob Rossi
2004-06-09 17:04     ` Daniel Jacobowitz
2004-06-09 17:58       ` Bob Rossi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox