This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] move exec_make_note_section earlier
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Fri, 18 Jul 2014 09:41:04 -0600
- Subject: [PATCH] move exec_make_note_section earlier
- Authentication-results: sourceware.org; auth=none
This patch moves exec_make_note_section a bit earlier in exec.c. This
lets us remove an otherwise unnecessary forward declaration and it
also makes the file a bit more in line with other code, as now
_initialize_exec is the final function in the file.
Tested by rebuilding.
I'm committing this as obvious.
2014-07-18 Tom Tromey <tromey@redhat.com>
* exec.c (exec_make_note_section): Move earlier.
---
gdb/ChangeLog | 4 ++++
gdb/exec.c | 12 +++++-------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/gdb/exec.c b/gdb/exec.c
index 087c122..5176bf1 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -951,7 +951,11 @@ exec_has_memory (struct target_ops *ops)
!= current_target_sections->sections_end);
}
-static char *exec_make_note_section (struct target_ops *self, bfd *, int *);
+static char *
+exec_make_note_section (struct target_ops *self, bfd *obfd, int *note_size)
+{
+ error (_("Can't create a corefile"));
+}
/* Fill in the exec file target vector. Very few entries need to be
defined. */
@@ -1019,9 +1023,3 @@ Show writing into executable and core files."), NULL,
add_target_with_completer (&exec_ops, filename_completer);
}
-
-static char *
-exec_make_note_section (struct target_ops *self, bfd *obfd, int *note_size)
-{
- error (_("Can't create a corefile"));
-}
--
1.9.3