mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-02-13 21:49:40 +00:00
Avoid producing broken non-native core files
gdb/ * linux-tdep.c (linux_corefile_thread_callback): Propagate any failure from register information collection. gdb/testsuite/ * lib/gdb.exp (gdb_gcore_cmd): Also handle a "Target does not support core file generation" reply.
This commit is contained in:
parent
72ee449576
commit
bbe769cc07
@ -1,3 +1,8 @@
|
||||
2013-10-24 Maciej W. Rozycki <macro@codesourcery.com>
|
||||
|
||||
* linux-tdep.c (linux_corefile_thread_callback): Propagate any
|
||||
failure from register information collection.
|
||||
|
||||
2013-10-24 Maciej W. Rozycki <macro@codesourcery.com>
|
||||
|
||||
* linux-tdep.c (linux_corefile_thread_data): Remove `num_notes'
|
||||
|
@ -1209,14 +1209,15 @@ linux_corefile_thread_callback (struct thread_info *info, void *data)
|
||||
args->note_data, args->note_size,
|
||||
args->stop_signal);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
do_cleanups (old_chain);
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2013-10-24 Maciej W. Rozycki <macro@codesourcery.com>
|
||||
|
||||
* lib/gdb.exp (gdb_gcore_cmd): Also handle a "Target does not
|
||||
support core file generation" reply.
|
||||
|
||||
2013-10-21 Jose E. Marchesi <jose.marchesi@oracle.com>
|
||||
|
||||
PR gdb/15986
|
||||
|
@ -3183,7 +3183,7 @@ proc gdb_gcore_cmd {core test} {
|
||||
verbose -log "'gcore' command undefined in gdb_gcore_cmd"
|
||||
}
|
||||
|
||||
-re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
|
||||
-re "(?:Can't create a corefile|Target does not support core file generation\\.)\[\r\n\]+$gdb_prompt $" {
|
||||
unsupported $test
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user