aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2020-03-29 15:24:48 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-03-29 15:24:48 -0400
commit69b037c30cadea06c3dc7f83e427d0f729c201cd (patch)
treea7ac2f9326b892710d500e75534ffde19d325041 /gdb
parent48993951ce343e397c4250c43c1708fffab01ac1 (diff)
downloadgdb-69b037c30cadea06c3dc7f83e427d0f729c201cd.zip
gdb-69b037c30cadea06c3dc7f83e427d0f729c201cd.tar.gz
gdb-69b037c30cadea06c3dc7f83e427d0f729c201cd.tar.bz2
gdb: rename partial symtab expand functions of debug info readers using legacy_psymtab
As I am trying to understand the dynamic of partial_symtab::read_symtab and partial_symtab::expand_psymtab, I think that renaming these functions helps make it clear that they are effectively implementations of the partial_symtab::expand_psymtab method. gdb/ChangeLog: * dbxread.c (dbx_psymtab_to_symtab_1): Rename to... (dbx_expand_psymtab): ... this. (start_psymtab): Update. * mdebugread.c (psymtab_to_symtab_1): Rename to... (mdebug_expand_psymtab): ... this. (parse_partial_symbols): Update. (new_psymtab): Update. * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to... (xcoff_expand_psymtab): ... this. (xcoff_start_psymtab): Update.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog13
-rw-r--r--gdb/dbxread.c6
-rw-r--r--gdb/mdebugread.c10
-rw-r--r--gdb/xcoffread.c4
4 files changed, 23 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2b4d94d..812d0b9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,18 @@
2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
+ * dbxread.c (dbx_psymtab_to_symtab_1): Rename to...
+ (dbx_expand_psymtab): ... this.
+ (start_psymtab): Update.
+ * mdebugread.c (psymtab_to_symtab_1): Rename to...
+ (mdebug_expand_psymtab): ... this.
+ (parse_partial_symbols): Update.
+ (new_psymtab): Update.
+ * xcoffread.c (xcoff_psymtab_to_symtab_1): Rename to...
+ (xcoff_expand_psymtab): ... this.
+ (xcoff_start_psymtab): Update.
+
+2020-03-29 Simon Marchi <simon.marchi@polymtl.ca>
+
* psympriv.h (partial_symtab) <read_dependencies>: Rename to...
<expand_dependencies>: ... this.
* psymtab.c (partial_symtab::read_dependencies): Rename to...
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 715009d..ac81278 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -268,7 +268,7 @@ static void read_ofile_symtab (struct objfile *, legacy_psymtab *);
static void dbx_read_symtab (legacy_psymtab *self,
struct objfile *objfile);
-static void dbx_psymtab_to_symtab_1 (legacy_psymtab *, struct objfile *);
+static void dbx_expand_psymtab (legacy_psymtab *, struct objfile *);
static void read_dbx_symtab (minimal_symbol_reader &, struct objfile *);
@@ -1909,7 +1909,7 @@ start_psymtab (struct objfile *objfile, const char *filename, CORE_ADDR textlow,
XOBNEW (&objfile->objfile_obstack, struct symloc);
LDSYMOFF (result) = ldsymoff;
result->legacy_read_symtab = dbx_read_symtab;
- result->legacy_expand_psymtab = dbx_psymtab_to_symtab_1;
+ result->legacy_expand_psymtab = dbx_expand_psymtab;
SYMBOL_SIZE (result) = symbol_size;
SYMBOL_OFFSET (result) = symbol_table_offset;
STRING_OFFSET (result) = string_table_offset;
@@ -2066,7 +2066,7 @@ dbx_end_psymtab (struct objfile *objfile, legacy_psymtab *pst,
}
static void
-dbx_psymtab_to_symtab_1 (legacy_psymtab *pst, struct objfile *objfile)
+dbx_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile)
{
gdb_assert (!pst->readin);
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index f4bb244..d9ad8ee 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -253,8 +253,8 @@ static void sort_blocks (struct symtab *);
static legacy_psymtab *new_psymtab (const char *, struct objfile *);
-static void psymtab_to_symtab_1 (legacy_psymtab *pst,
- struct objfile *objfile);
+static void mdebug_expand_psymtab (legacy_psymtab *pst,
+ struct objfile *objfile);
static void add_block (struct block *, struct symtab *);
@@ -2613,7 +2613,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
/* The way to turn this into a symtab is to call... */
pst->legacy_read_symtab = mdebug_read_symtab;
- pst->legacy_expand_psymtab = psymtab_to_symtab_1;
+ pst->legacy_expand_psymtab = mdebug_expand_psymtab;
/* Set up language for the pst.
The language from the FDR is used if it is unambigious (e.g. cfront
@@ -3835,7 +3835,7 @@ mdebug_next_symbol_text (struct objfile *objfile)
The flow of control and even the memory allocation differs. FIXME. */
static void
-psymtab_to_symtab_1 (legacy_psymtab *pst, struct objfile *objfile)
+mdebug_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile)
{
bfd_size_type external_sym_size;
bfd_size_type external_pdr_size;
@@ -4645,7 +4645,7 @@ new_psymtab (const char *name, struct objfile *objfile)
/* The way to turn this into a symtab is to call... */
psymtab->legacy_read_symtab = mdebug_read_symtab;
- psymtab->legacy_expand_psymtab = psymtab_to_symtab_1;
+ psymtab->legacy_expand_psymtab = mdebug_expand_psymtab;
return (psymtab);
}
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 1ac01c8..6c11813 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -1821,7 +1821,7 @@ find_linenos (struct bfd *abfd, struct bfd_section *asect, void *vpinfo)
}
static void
-xcoff_psymtab_to_symtab_1 (legacy_psymtab *pst, struct objfile *objfile)
+xcoff_expand_psymtab (legacy_psymtab *pst, struct objfile *objfile)
{
gdb_assert (!pst->readin);
@@ -1974,7 +1974,7 @@ xcoff_start_psymtab (struct objfile *objfile,
XOBNEW (&objfile->objfile_obstack, struct symloc);
((struct symloc *) result->read_symtab_private)->first_symnum = first_symnum;
result->legacy_read_symtab = xcoff_read_symtab;
- result->legacy_expand_psymtab = xcoff_psymtab_to_symtab_1;
+ result->legacy_expand_psymtab = xcoff_expand_psymtab;
/* Deduce the source language from the filename for this psymtab. */
psymtab_language = deduce_language_from_filename (filename);