public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "mail at cristos dot x25.pl" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/18168] New: "set write on" or "--write" corrupt the binary file Date: Thu, 26 Mar 2015 16:52:00 -0000 [thread overview] Message-ID: <bug-18168-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=18168 Bug ID: 18168 Summary: "set write on" or "--write" corrupt the binary file Product: gdb Version: HEAD Status: NEW Severity: critical Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: mail at cristos dot x25.pl Created attachment 8213 --> https://sourceware.org/bugzilla/attachment.cgi?id=8213&action=edit the hexdumps of a binary file before and after executing commands in the description When enabling binary patching via "set write on" command or "--write" command line switch, the exectuable loaded becomes corrupted. Try executing: $ gdb --write a_binary_file (gdb)quit # ./a_binary_file bash: ./a_binary_file: cannot execute binary file: Exec format error Careful examination of the binary shows this: # file ./a_binary_file a_binary_file: data # readelf -a ./a_binary_file readelf: Error: Not an ELF file - it has the wrong magic bytes at the start Attached are the hexdumps of the files before and after executing "gdb --write" and quitting gdb immediately -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2015-03-26 16:48 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-26 16:52 mail at cristos dot x25.pl [this message] 2015-03-26 18:10 ` [Bug gdb/18168] " mail at cristos dot x25.pl 2015-03-26 18:43 ` mail at cristos dot x25.pl 2015-07-26 20:34 ` jan.kratochvil at redhat dot com 2015-07-27 16:30 ` [Bug gdb/18168] "set write on" or "--write" corrupt the binary file - 7.9 regression jan.kratochvil at redhat dot com 2022-05-13 10:08 ` pedro at palves dot net
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-18168-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).