aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-riscv.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-11-11 07:58:35 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-11-11 14:04:13 -0500
commit075732ad92d1d6631c253c6213f2f3e03d07bdb6 (patch)
tree2a933cac835f096b1990dbb21d54814036a859dc /bfd/elfxx-riscv.h
parent36895e5335bcfaab939c7e8d2f271face79bc45c (diff)
downloadgdb-075732ad92d1d6631c253c6213f2f3e03d07bdb6.zip
gdb-075732ad92d1d6631c253c6213f2f3e03d07bdb6.tar.gz
gdb-075732ad92d1d6631c253c6213f2f3e03d07bdb6.tar.bz2
gdb: fix start breakpoint expression not working in some languages
Commit 0be837be9fb4 ("gdb: make "start" breakpoint inferior-specific") regresses gdb.ada/start.exp: (gdb) start Error in expression, near `1'. (gdb) UNTESTED: gdb.ada/start.exp: start failed to land inside the right procedure This is because in Ada, the equality operator is =, not ==. I checked the other languages supported by GDB, these other languages use = for equality: - Pascal: tests like gdb.pascal/hello.exp are affected too - Modula-2: I tried building a Modula-2 hello world using gm2, but it seems like the generated DWARF doesn't specify the Modula-2 language in the CUs, it's C++ and C, so the selected language isn't "modula-2". But if I manually do "set language modula-2" on a dummy program and then "start", I get the same error. Other languages all use ==. So, a short term fix would be to use = or == in the expression, based on the current language. If this was meant to be permanent, I would suggest adding something like an "equality_operator" method to language_defn, that returns the right equality operator for the language. But the goal is to replace all this with proper inferior-specific breakpoints, so I hope all this is temporary. Approved-By: Tom de Vries <tdevries@suse.de> Change-Id: Id4d38e14a80e6bbbb1ad2b2277f974dd55192969
Diffstat (limited to 'bfd/elfxx-riscv.h')
0 files changed, 0 insertions, 0 deletions