summaryrefslogtreecommitdiff
path: root/bfd/hpux-core.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2005-12-23 10:19:40 +0000
committerJoel Brobecker <brobecker@gnat.com>2005-12-23 10:19:40 +0000
commitc0d48a1432f33fd6bb10df421120489f5f54e60f (patch)
treefc446c9368989c5096e3764f6fbb6e57e11713bb /bfd/hpux-core.c
parent78e7506b48c370aa56d92f07a60adc3a7974743b (diff)
downloadgdb-c0d48a1432f33fd6bb10df421120489f5f54e60f.tar.gz
* corefile.c (generic_core_file_matches_executable_p): New function.
* libbfd-in.h (generic_core_file_matches_executable_p): Add declaration. * libbfd.h: Regenerate. * hpux-core.c: ANSIfy function declarations and prototypes. (thread_section_p): Manually expand bfd_section_name macro to make it clear that parameter ABFD is not used. (hpux_core_core_file_matches_executable_p): Delete, replaced by macro pointing to generic_core_file_matches_executable_p. * aix386-core.c: Replace core_file_matches_executable_p null implementation by generic_core_file_matches_executable_p by using a macro. * aix5ppc-core.c: Likewise. * cisco-core.c: Likewise. * hppabsd-core.c: Likewise. * irix-core.c: Likewise. * lynx-core.c: Likewise. * mach-o.c: Likewise. * netbsd-core.c: Likewise. * osf-core.c: Likewise. * ptrace-core.c: Likewise. * sco5-core.c: Likewise. * trad-core.c: Likewise.
Diffstat (limited to 'bfd/hpux-core.c')
-rw-r--r--bfd/hpux-core.c50
1 files changed, 15 insertions, 35 deletions
diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c
index 9a97531eb93..08adcd3a1e6 100644
--- a/bfd/hpux-core.c
+++ b/bfd/hpux-core.c
@@ -101,29 +101,19 @@ struct hpux_core_struct
#define core_command(bfd) (core_hdr(bfd)->cmd)
#define core_kernel_thread_id(bfd) (core_hdr(bfd)->lwpid)
#define core_user_thread_id(bfd) (core_hdr(bfd)->user_tid)
+#define hpux_core_core_file_matches_executable_p generic_core_file_matches_executable_p
-static asection *make_bfd_asection
- PARAMS ((bfd *, const char *, flagword, bfd_size_type, bfd_vma,
- unsigned int));
-static const bfd_target *hpux_core_core_file_p
- PARAMS ((bfd *));
-static char *hpux_core_core_file_failing_command
- PARAMS ((bfd *));
-static int hpux_core_core_file_failing_signal
- PARAMS ((bfd *));
-static bfd_boolean hpux_core_core_file_matches_executable_p
- PARAMS ((bfd *, bfd *));
-static void swap_abort
- PARAMS ((void));
+static asection *make_bfd_asection (bfd *, const char *, flagword,
+ bfd_size_type, bfd_vma, unsigned int);
+static const bfd_target *hpux_core_core_file_p (bfd *);
+static char *hpux_core_core_file_failing_command (bfd *);
+static int hpux_core_core_file_failing_signal (bfd *);
+static void swap_abort (void);
static asection *
-make_bfd_asection (abfd, name, flags, size, vma, alignment_power)
- bfd *abfd;
- const char *name;
- flagword flags;
- bfd_size_type size;
- bfd_vma vma;
- unsigned int alignment_power;
+make_bfd_asection (bfd *abfd, const char *name, flagword flags,
+ bfd_size_type size, bfd_vma vma,
+ unsigned int alignment_power)
{
asection *asect;
char *newname;
@@ -155,7 +145,7 @@ thread_section_p (bfd *abfd ATTRIBUTE_UNUSED,
asection *sect,
void *obj ATTRIBUTE_UNUSED)
{
- return (strncmp (bfd_section_name (abfd, sect), ".reg/", 5) == 0);
+ return (strncmp (sect->name, ".reg/", 5) == 0);
}
/* this function builds a bfd target if the file is a corefile.
@@ -168,8 +158,7 @@ thread_section_p (bfd *abfd ATTRIBUTE_UNUSED,
(I am just guessing here!)
*/
static const bfd_target *
-hpux_core_core_file_p (abfd)
- bfd *abfd;
+hpux_core_core_file_p (bfd *abfd)
{
int good_sections = 0;
int unknown_sections = 0;
@@ -361,30 +350,21 @@ hpux_core_core_file_p (abfd)
}
static char *
-hpux_core_core_file_failing_command (abfd)
- bfd *abfd;
+hpux_core_core_file_failing_command (bfd *abfd)
{
return core_command (abfd);
}
static int
-hpux_core_core_file_failing_signal (abfd)
- bfd *abfd;
+hpux_core_core_file_failing_signal (bfd *abfd)
{
return core_signal (abfd);
}
-static bfd_boolean
-hpux_core_core_file_matches_executable_p (core_bfd, exec_bfd)
- bfd *core_bfd ATTRIBUTE_UNUSED;
- bfd *exec_bfd ATTRIBUTE_UNUSED;
-{
- return TRUE; /* FIXME, We have no way of telling at this point */
-}
/* If somebody calls any byte-swapping routines, shoot them. */
static void
-swap_abort ()
+swap_abort (void)
{
abort(); /* This way doesn't require any declaration for ANSI to fuck up */
}