public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
* [Bug tdep/28653] New: "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target @ 2021-12-06 4:59 cjn at google dot com 2021-12-06 5:01 ` [Bug tdep/28653] " cjn at google dot com ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: cjn at google dot com @ 2021-12-06 4:59 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=28653 Bug ID: 28653 Summary: "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: tdep Assignee: unassigned at sourceware dot org Reporter: cjn at google dot com Target Milestone: --- "arm_psr_thumb_bit" and "arm_pc_is_thumb" rely on the "is_m" flag being set inside "arm_gdbarch_init". That only can happen if an m-profile executable file is loaded or a complete target description is available, though. "arm_gdbarch_init" doesn't actually pay attention if explicitly told: "set archicecture armv7e-m" - the "is_m" flag remains zero, and so software single stepping can be weird, and the register dumps show "cpsr" rather than the expected "xpsr". I added a print where the "tdep->is_m" flag is set near the end of "arm_gdbarch_init" and get this output: (gdb) set architecture armv7e-m arm_gdbarch_init:9293: is_m = 0 The target architecture is set to "armv7e-m". Setting the architecture indirectly via a "file" command, does work around the problem: (gdb) show architecture The target architecture is set to "auto" (currently "i386"). (gdb) file example.elf arm_gdbarch_init:9293: is_m = 1 Reading symbols from example.elf... (gdb) show architecture The target architecture is set to "auto" (currently "armv7e-m"). There are other m-profile architectures available via "set architecture" that should also be fixed. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tdep/28653] "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target 2021-12-06 4:59 [Bug tdep/28653] New: "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target cjn at google dot com @ 2021-12-06 5:01 ` cjn at google dot com 2021-12-06 5:35 ` cjn at google dot com ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: cjn at google dot com @ 2021-12-06 5:01 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=28653 Carl Norum <cjn at google dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cjn at google dot com -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tdep/28653] "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target 2021-12-06 4:59 [Bug tdep/28653] New: "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target cjn at google dot com 2021-12-06 5:01 ` [Bug tdep/28653] " cjn at google dot com @ 2021-12-06 5:35 ` cjn at google dot com 2021-12-06 17:36 ` cjn at google dot com ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: cjn at google dot com @ 2021-12-06 5:35 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=28653 Carl Norum <cjn at google dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|HEAD |11.1 -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tdep/28653] "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target 2021-12-06 4:59 [Bug tdep/28653] New: "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target cjn at google dot com 2021-12-06 5:01 ` [Bug tdep/28653] " cjn at google dot com 2021-12-06 5:35 ` cjn at google dot com @ 2021-12-06 17:36 ` cjn at google dot com 2021-12-06 17:36 ` cjn at google dot com 2022-10-27 23:53 ` luis.machado at arm dot com 4 siblings, 0 replies; 6+ messages in thread From: cjn at google dot com @ 2021-12-06 17:36 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=28653 --- Comment #1 from Carl Norum <cjn at google dot com> --- Confirmed same behaviour on HEAD today. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tdep/28653] "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target 2021-12-06 4:59 [Bug tdep/28653] New: "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target cjn at google dot com ` (2 preceding siblings ...) 2021-12-06 17:36 ` cjn at google dot com @ 2021-12-06 17:36 ` cjn at google dot com 2022-10-27 23:53 ` luis.machado at arm dot com 4 siblings, 0 replies; 6+ messages in thread From: cjn at google dot com @ 2021-12-06 17:36 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=28653 Carl Norum <cjn at google dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|11.1 |HEAD -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tdep/28653] "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target 2021-12-06 4:59 [Bug tdep/28653] New: "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target cjn at google dot com ` (3 preceding siblings ...) 2021-12-06 17:36 ` cjn at google dot com @ 2022-10-27 23:53 ` luis.machado at arm dot com 4 siblings, 0 replies; 6+ messages in thread From: luis.machado at arm dot com @ 2022-10-27 23:53 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=28653 Luis Machado <luis.machado at arm dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |luis.machado at arm dot com --- Comment #2 from Luis Machado <luis.machado at arm dot com> --- We might be able to adjust the code so it takes the option into account, though that opens things for the possibility of setting the architecture to some incompatible variation. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-10-27 23:53 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-12-06 4:59 [Bug tdep/28653] New: "set arch armv7e-m" doesn't actually make gdb think it's connected to an m-profile target cjn at google dot com 2021-12-06 5:01 ` [Bug tdep/28653] " cjn at google dot com 2021-12-06 5:35 ` cjn at google dot com 2021-12-06 17:36 ` cjn at google dot com 2021-12-06 17:36 ` cjn at google dot com 2022-10-27 23:53 ` luis.machado at arm dot com
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).