aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2019-07-02 10:30:46 -0400
committerSimon Marchi <simon.marchi@efficios.com>2019-07-02 10:31:00 -0400
commit854f60884cc35806dab1c0f9e7711c45cefaf7fc (patch)
treee56d33b4b98fca948d29f9f3fd9d9eb7c03c2483 /gdb
parent125f83f66c10c89530d011f4f81324b1f43afcda (diff)
downloadfsf-binutils-gdb-854f60884cc35806dab1c0f9e7711c45cefaf7fc.zip
fsf-binutils-gdb-854f60884cc35806dab1c0f9e7711c45cefaf7fc.tar.gz
fsf-binutils-gdb-854f60884cc35806dab1c0f9e7711c45cefaf7fc.tar.bz2
Move generic_load declaration to symfile.h
... since the implementation is in symfile.c. At the same time, add some documentation and make sure the first parameter's name in the declaration matches the definition. gdb/ChangeLog: * defs.h (generic_load): Move from here... * symfile.h (generic_load): ... to here. Rename name parameter to args. * symfile.c (generic_load): Add comment.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/defs.h3
-rw-r--r--gdb/symfile.c2
-rw-r--r--gdb/symfile.h6
4 files changed, 15 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4cb3f6f..9601178 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2019-07-02 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * defs.h (generic_load): Move from here...
+ * symfile.h (generic_load): ... to here. Rename name parameter
+ to args.
+ * symfile.c (generic_load): Add comment.
+
2019-07-01 Tom Tromey <tromey@adacore.com>
* dwarf2read.c
diff --git a/gdb/defs.h b/gdb/defs.h
index 3d878c8..81ab74c 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -300,9 +300,6 @@ EXTERN_C char *re_comp (const char *);
extern void symbol_file_command (const char *, int);
-/* * Remote targets may wish to use this as their load function. */
-extern void generic_load (const char *name, int from_tty);
-
/* From top.c */
typedef void initialize_file_ftype (void);
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 6f9c81c..59647bf 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -2023,6 +2023,8 @@ static void print_transfer_performance (struct ui_file *stream,
unsigned long write_count,
std::chrono::steady_clock::duration d);
+/* See symfile.h. */
+
void
generic_load (const char *args, int from_tty)
{
diff --git a/gdb/symfile.h b/gdb/symfile.h
index daddd2e..403dd16 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -532,6 +532,12 @@ void expand_symtabs_matching
void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
int need_fullname);
+/* Target-agnostic function to load the sections of an executable into memory.
+
+ ARGS should be in the form "EXECUTABLE [OFFSET]", where OFFSET is an
+ optional offset to apply to each section. */
+extern void generic_load (const char *args, int from_tty);
+
/* From dwarf2read.c */
/* Names for a dwarf2 debugging section. The field NORMAL is the normal