public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
* [Bug gdb/27773] New: 'Dump memory' command aborted in GDB @ 2021-04-24 3:36 1179317825 at qq dot com 2021-04-26 15:28 ` [Bug gdb/27773] " cvs-commit at gcc dot gnu.org 2021-04-26 15:33 ` simark at simark dot ca 0 siblings, 2 replies; 3+ messages in thread From: 1179317825 at qq dot com @ 2021-04-24 3:36 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=27773 Bug ID: 27773 Summary: 'Dump memory' command aborted in GDB Product: gdb Version: 10.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: 1179317825 at qq dot com Target Milestone: --- When GDB debugging, if the directory parameter of the `dump memory` command does not exist, an null pointer exception will occur. such as: (gdb) dump memory test 0x7fffffffe590 0x7fffffffe590+0x10 (gdb) dump memory TEST/test 0x7fffffffe590 0x7fffffffe590+0x10 Aborted (core dumped) - The `TEST` directory does not exist. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug gdb/27773] 'Dump memory' command aborted in GDB 2021-04-24 3:36 [Bug gdb/27773] New: 'Dump memory' command aborted in GDB 1179317825 at qq dot com @ 2021-04-26 15:28 ` cvs-commit at gcc dot gnu.org 2021-04-26 15:33 ` simark at simark dot ca 1 sibling, 0 replies; 3+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2021-04-26 15:28 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=27773 --- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Simon Marchi <simark@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bea3329b76cf131ad4ac27acb6728b38984998b9 commit bea3329b76cf131ad4ac27acb6728b38984998b9 Author: Simon Marchi <simon.marchi@polymtl.ca> Date: Mon Apr 26 11:27:07 2021 -0400 gdb: check result of gdb_fopen_cloexec in dump_binary_file Bug 27773 shows that passing a filename in a non-existent directory to the "dump binary" command leads to a gdb crash. This is because the gdb_fopen_cloexec in dump_binary_file fails (returns nullptr) and the return value is not checked. Fix that by erroring out if gdb_fopen_cloexec fails. gdb/ChangeLog: PR gdb/27773 * cli/cli-dump.c (dump_binary_file): Check result of gdb_fopen_cloexec. gdb/testsuite/ChangeLog: PR gdb/27773 * gdb.base/dump.exp: Test dump to non-existent dir. Change-Id: Iea89a3bf9e6b9dcc31142faa5ae17bc855759328 -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug gdb/27773] 'Dump memory' command aborted in GDB 2021-04-24 3:36 [Bug gdb/27773] New: 'Dump memory' command aborted in GDB 1179317825 at qq dot com 2021-04-26 15:28 ` [Bug gdb/27773] " cvs-commit at gcc dot gnu.org @ 2021-04-26 15:33 ` simark at simark dot ca 1 sibling, 0 replies; 3+ messages in thread From: simark at simark dot ca @ 2021-04-26 15:33 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=27773 Simon Marchi <simark at simark dot ca> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |simark at simark dot ca Status|UNCONFIRMED |RESOLVED --- Comment #2 from Simon Marchi <simark at simark dot ca> --- Fixed. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-04-26 15:33 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-04-24 3:36 [Bug gdb/27773] New: 'Dump memory' command aborted in GDB 1179317825 at qq dot com 2021-04-26 15:28 ` [Bug gdb/27773] " cvs-commit at gcc dot gnu.org 2021-04-26 15:33 ` simark at simark dot ca
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).