aboutsummaryrefslogtreecommitdiff
path: root/gas/stabs.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-10-08 14:37:20 +0000
committerNick Clifton <nickc@redhat.com>2003-10-08 14:37:20 +0000
commit05da4302188949f1752cb1fa5def4b010450dbe4 (patch)
tree8d257fbd257ce60a4a7969a65e74ec216d74df61 /gas/stabs.c
parente62eb3ee7e4f8b4821b2f029d0f9d2dbbc462b44 (diff)
downloadgdb-05da4302188949f1752cb1fa5def4b010450dbe4.zip
gdb-05da4302188949f1752cb1fa5def4b010450dbe4.tar.gz
gdb-05da4302188949f1752cb1fa5def4b010450dbe4.tar.bz2
* as.c (use_gnu_debug_info_extensions) : New variable.
(parse_args) : Accept new --gstabs+ option, and set `use_gnu_debug_info_extensions'. (show_usage) : Document --gstabs+ option. * as.h (use_gnu_debug_info_extensions) : New extern declaration. * stabs.c (stabs_generate_asm_file) : If `use_gnu_debug_info_extensions' is set add the compilation directory to the stabs debug info. * doc/as.texinfo : Document --gstabs+ option. * NEWS: Mention new feature.
Diffstat (limited to 'gas/stabs.c')
-rw-r--r--gas/stabs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gas/stabs.c b/gas/stabs.c
index 900826b..33b14c1 100644
--- a/gas/stabs.c
+++ b/gas/stabs.c
@@ -502,6 +502,15 @@ stabs_generate_asm_file ()
unsigned int lineno;
as_where (&file, &lineno);
+ if (use_gnu_debug_info_extensions)
+ {
+ char *dir, *dir2;
+
+ dir = getpwd ();
+ dir2 = alloca (strlen (dir) + 2);
+ sprintf (dir2, "%s%s", dir, "/");
+ generate_asm_file (N_SO, dir2);
+ }
generate_asm_file (N_SO, file);
}