public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "howarth at nitro dot med.uc.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/53453] darwin linker expects both AT_name and AT_comp_dir debug notes
Date: Thu, 24 May 2012 19:55:00 -0000	[thread overview]
Message-ID: <bug-53453-4-WqorHXX11e@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-53453-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53453

--- Comment #8 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-05-24 19:52:04 UTC ---
Are we sure this test for...

      /* Don't add cwd for <built-in>.  */
      if (!IS_ABSOLUTE_PATH (filename) && filename[0] != '<')
        add_comp_dir_attribute (die);

is still required? The original description says "When dwarf2out sees an input
file without a dir separator, it puts the current working directory
in the list of directories to search.". However this change predates....

r70189
Author: aoliva
Date:   Tue Aug 5 21:15:57 2003 UTC (8 years, 9 months ago)
Changed paths:  17
Log Message:
* c.opt: Introduce -fworking-directory.
* doc/cpp.texi, doc/invoke.texi, doc/cppopts.texi: Document it.
* c-common.h (flag_working_directory): Declare.
* c-common.c (flag_working_directory): Define.
* c-opts.c (c_common_handle_options): Set it.
(sanitize_cpp_opts): Set...
* cpplib.h (struct cpp_options): ... working_directory option.
(struct cpp_callbacks): Add dir_change.
* cppinit.c (read_original_filename): Call...
(read_original_directory): New.  Look for # 1 "directory//"
and process it.
(cpp_read_main_file): Call dir_change callback if working_directory
option is set.
* gcc.c (cpp_unique_options): Pass -g*.
* c-lex.c (cb_dir_change): New.
(init_c_lex): Set dir_change callback.
* toplev.c (src_pwd): New static variable.
(set_src_pwd, get_src_pwd): New functions.
* toplev.h (get_src_pwd, set_src_pwd): Declare.
* dbxout.c (dbxout_init): Call get_src_pwd() instead of getpwd().
* dwarf2out.c (gen_compile_unit_die): Likewise.
* dwarfout.c (output_compile_unit_die, dwarfout_init): Likewise.      

which changed...

--- trunk/gcc/dwarf2out.c       2003/08/01 21:51:13     70072
+++ trunk/gcc/dwarf2out.c       2003/08/05 21:15:57     70189
@@ -9506,7 +9506,7 @@
 static void
 add_comp_dir_attribute (dw_die_ref die)
 {
-  const char *wd = getpwd ();
+  const char *wd = get_src_pwd (); 
   if (wd != NULL)
     add_AT_string (die, DW_AT_comp_dir, wd);
 }

so that DW_AT_comp_dir pointed at the source directory rather than at the
working directory. Might that not eliminate dwarf2out putting the current
working directory
in the list of directories to search? Perhaps the hack...

      /* Don't add cwd for <built-in>.  */
      if (!IS_ABSOLUTE_PATH (filename) && filename[0] != '<')

is no longer required post revision 70189.


  parent reply	other threads:[~2012-05-24 19:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-22 13:27 [Bug debug/53453] New: " howarth at nitro dot med.uc.edu
2012-05-22 14:30 ` [Bug debug/53453] " howarth at nitro dot med.uc.edu
2012-05-22 14:40 ` howarth at nitro dot med.uc.edu
2012-05-22 14:41 ` jakub at gcc dot gnu.org
2012-05-22 23:32 ` howarth at nitro dot med.uc.edu
2012-05-22 23:55 ` jakub at gcc dot gnu.org
2012-05-24 13:54 ` howarth at nitro dot med.uc.edu
2012-05-24 19:41 ` howarth at nitro dot med.uc.edu
2012-05-24 19:55 ` howarth at nitro dot med.uc.edu [this message]
2012-05-24 20:20 ` jakub at gcc dot gnu.org
2012-05-24 23:27 ` howarth at nitro dot med.uc.edu
2012-05-25  5:54 ` howarth at nitro dot med.uc.edu
2012-05-25  6:04 ` mrs at gcc dot gnu.org
2012-05-25 13:03 ` howarth at nitro dot med.uc.edu
2012-05-25 13:41 ` howarth at nitro dot med.uc.edu
2012-05-30  0:08 ` mrs at gcc dot gnu.org
2012-05-30  1:37 ` mrs at gcc dot gnu.org
2013-04-17  7:17 ` ebotcazou at gcc dot gnu.org
2013-04-17 15:55 ` mrs at gcc dot gnu.org
2013-04-17 16:21 ` mrs at gcc dot gnu.org

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=bug-53453-4-WqorHXX11e@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).