summaryrefslogtreecommitdiff
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
commit3e7d4f98ce9eab0cfdcc58a1da3cf21b7bce14d5 (patch)
treef1dcaf39d0b4a8c96c3d5eaa122b5ff7d07b7458 /gas/stabs.c
parenta8a5965e10d587ef1dba930e721621ce052a6279 (diff)
downloadbinutils-redhat-3e7d4f98ce9eab0cfdcc58a1da3cf21b7bce14d5.tar.gz
* 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 900826b231..33b14c149d 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);
}