From 57c22c6ce1e294fcec9653c0cf2c37eb77225fe6 Mon Sep 17 00:00:00 2001 From: Bob Rossi Date: Thu, 10 Jun 2004 20:05:45 +0000 Subject: Add the -file-list-exec-source-files command to MI. --- gdb/dbxread.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gdb/dbxread.c') diff --git a/gdb/dbxread.c b/gdb/dbxread.c index c71b0c8..a505c77 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -1457,6 +1457,7 @@ read_dbx_symtab (struct objfile *objfile) static int prev_so_symnum = -10; static int first_so_symnum; char *p; + static char *dirname_nso; int prev_textlow_not_set; valu = nlist.n_value + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile)); @@ -1514,18 +1515,27 @@ read_dbx_symtab (struct objfile *objfile) p = strrchr (namestring, '/'); if (p && *(p + 1) == '\000') - continue; /* Simply ignore directory name SOs */ + { + /* Save the directory name SOs locally, then save it into + the psymtab when it's created below. */ + dirname_nso = namestring; + continue; + } /* Some other compilers (C++ ones in particular) emit useless SOs for non-existant .c files. We ignore all subsequent SOs that immediately follow the first. */ if (!pst) + { pst = start_psymtab (objfile, namestring, valu, first_so_symnum * symbol_size, objfile->global_psymbols.next, objfile->static_psymbols.next); + pst->dirname = dirname_nso; + dirname_nso = NULL; + } continue; } -- cgit v1.1