Move generic_load declaration to symfile.h
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 2 Jul 2019 14:30:46 +0000 (10:30 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 2 Jul 2019 14:31:00 +0000 (10:31 -0400)
... 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.

gdb/ChangeLog
gdb/defs.h
gdb/symfile.c
gdb/symfile.h

index 4cb3f6f1bc2067fcdf9510d39e7d8985d2e05946..9601178492227b34b20a05f98187c6ca18657151 100644 (file)
@@ -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
 2019-07-01  Tom Tromey  <tromey@adacore.com>
 
        * dwarf2read.c
index 3d878c84e3f17e0522e83d1cb18aaeaad46a6604..81ab74c27f5df7da5558d19f07cf6e4922bfaf6c 100644 (file)
@@ -300,9 +300,6 @@ EXTERN_C char *re_comp (const char *);
 
 extern void symbol_file_command (const char *, int);
 
 
 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);
 /* From top.c */
 
 typedef void initialize_file_ftype (void);
index 6f9c81c8b9489bab878e4839e79b9104a4dac005..59647bfe9d80964cfba0905856505d989f5b1db8 100644 (file)
@@ -2023,6 +2023,8 @@ static void print_transfer_performance (struct ui_file *stream,
                                        unsigned long write_count,
                                        std::chrono::steady_clock::duration d);
 
                                        unsigned long write_count,
                                        std::chrono::steady_clock::duration d);
 
+/* See symfile.h.  */
+
 void
 generic_load (const char *args, int from_tty)
 {
 void
 generic_load (const char *args, int from_tty)
 {
index daddd2e21abe55134815871637849a46764e4b2f..403dd165264e427db214644c347f5b0bceb67360 100644 (file)
@@ -532,6 +532,12 @@ void expand_symtabs_matching
 void map_symbol_filenames (symbol_filename_ftype *fun, void *data,
                           int need_fullname);
 
 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
 /* From dwarf2read.c */
 
 /* Names for a dwarf2 debugging section.  The field NORMAL is the normal
This page took 0.03651 seconds and 4 git commands to generate.