projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't let bin2hex call strlen
[deliverable/binutils-gdb.git]
/
gdb
/
linux-tdep.c
diff --git
a/gdb/linux-tdep.c
b/gdb/linux-tdep.c
index eb8ea2b664de4cc9d7aa05f59695a3b3f602d975..bd1e5a2f36cd111c052fcf414f5aab0c60625bde 100644
(file)
--- a/
gdb/linux-tdep.c
+++ b/
gdb/linux-tdep.c
@@
-1,6
+1,6
@@
/* Target-dependent code for GNU/Linux, architecture independent.
/* Target-dependent code for GNU/Linux, architecture independent.
- Copyright (C) 2009-201
3
Free Software Foundation, Inc.
+ Copyright (C) 2009-201
4
Free Software Foundation, Inc.
This file is part of GDB.
This file is part of GDB.
@@
-32,7
+32,6
@@
#include "cli/cli-utils.h"
#include "arch-utils.h"
#include "gdb_obstack.h"
#include "cli/cli-utils.h"
#include "arch-utils.h"
#include "gdb_obstack.h"
-#include "cli/cli-utils.h"
#include <ctype.h>
#include <ctype.h>
@@
-1176,7
+1175,6
@@
struct linux_corefile_thread_data
bfd *obfd;
char *note_data;
int *note_size;
bfd *obfd;
char *note_data;
int *note_size;
- int num_notes;
enum gdb_signal stop_signal;
linux_collect_thread_registers_ftype collect;
};
enum gdb_signal stop_signal;
linux_collect_thread_registers_ftype collect;
};
@@
-1194,7
+1192,7
@@
linux_corefile_thread_callback (struct thread_info *info, void *data)
struct cleanup *old_chain;
struct regcache *regcache;
gdb_byte *siginfo_data;
struct cleanup *old_chain;
struct regcache *regcache;
gdb_byte *siginfo_data;
- LONGEST siginfo_size;
+ LONGEST siginfo_size
= 0
;
regcache = get_thread_arch_regcache (info->ptid, args->gdbarch);
regcache = get_thread_arch_regcache (info->ptid, args->gdbarch);
@@
-1209,17
+1207,16
@@
linux_corefile_thread_callback (struct thread_info *info, void *data)
args->note_data = args->collect (regcache, info->ptid, args->obfd,
args->note_data, args->note_size,
args->stop_signal);
args->note_data = args->collect (regcache, info->ptid, args->obfd,
args->note_data, args->note_size,
args->stop_signal);
- args->num_notes++;
- if (siginfo_data != NULL)
- {
+ /* Don't return anything if we got no register information above,
+ such a core file is useless. */
+ if (args->note_data != NULL)
+ if (siginfo_data != NULL)
args->note_data = elfcore_write_note (args->obfd,
args->note_data,
args->note_size,
"CORE", NT_SIGINFO,
siginfo_data, siginfo_size);
args->note_data = elfcore_write_note (args->obfd,
args->note_data,
args->note_size,
"CORE", NT_SIGINFO,
siginfo_data, siginfo_size);
- args->num_notes++;
- }
do_cleanups (old_chain);
}
do_cleanups (old_chain);
}
@@
-1467,7
+1464,6
@@
linux_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size,
thread_args.obfd = obfd;
thread_args.note_data = note_data;
thread_args.note_size = note_size;
thread_args.obfd = obfd;
thread_args.note_data = note_data;
thread_args.note_size = note_size;
- thread_args.num_notes = 0;
thread_args.stop_signal = find_stop_signal ();
thread_args.collect = collect;
iterate_over_threads (linux_corefile_thread_callback, &thread_args);
thread_args.stop_signal = find_stop_signal ();
thread_args.collect = collect;
iterate_over_threads (linux_corefile_thread_callback, &thread_args);
This page took
0.03907 seconds
and
4
git commands to generate.