aboutsummaryrefslogtreecommitdiff
path: root/gdb/source.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2012-11-09 13:23:33 +0000
committerAndrew Burgess <aburgess@broadcom.com>2012-11-09 13:23:33 +0000
commited8a1c2de8eef8bd5d22600eeaa4fcad409a01ec (patch)
tree2a4495311bd3e0aab6c3fae025c9fef47b92c772 /gdb/source.c
parent504b36fd47a9f41055e7117a182a1e1c71c7cbcb (diff)
downloadgdb-ed8a1c2de8eef8bd5d22600eeaa4fcad409a01ec.zip
gdb-ed8a1c2de8eef8bd5d22600eeaa4fcad409a01ec.tar.gz
gdb-ed8a1c2de8eef8bd5d22600eeaa4fcad409a01ec.tar.bz2
http://sourceware.org/ml/gdb-patches/2012-10/msg00083.html
gdb/ChangeLog * source.c (print_source_lines_base): Add fullname field giving full path to file in mi output. * NEWS: Mention the new fullname field. gdb/doc/ChangeLog * gdb.texinfo (GDB/MI Data Manipulation): Add fullname field to the example -data-disassemble output. Extend the description of the -data-disassemble results to document all fields. Document the cli disassemble command as being related to -data-disassemble. gdb/testsuite/ChangeLog * gdb.mi/mi-disassemble.exp: Expect fullname field in mi disassembly output.
Diffstat (limited to 'gdb/source.c')
-rw-r--r--gdb/source.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 307fecc..9813c43 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1301,6 +1301,13 @@ print_source_lines_base (struct symtab *s, int line, int stopline, int noerror)
ui_out_field_int (uiout, "line", line);
ui_out_text (uiout, "\tin ");
ui_out_field_string (uiout, "file", s->filename);
+ if (ui_out_is_mi_like_p (uiout))
+ {
+ const char *fullname = symtab_to_fullname (s);
+
+ if (fullname != NULL)
+ ui_out_field_string (uiout, "fullname", fullname);
+ }
ui_out_text (uiout, "\n");
}