[0/1] gdb, infcmd: Support jump command with same line in multiple object files.

Message ID 20230308132607.1674441-1-matti.puputti@intel.com
Headers
Series gdb, infcmd: Support jump command with same line in multiple object files. |

Message

Matti Puputti March 8, 2023, 1:26 p.m. UTC
  Fixes the issue where jump fails if the jump target is in multiple object
files.

For example, a header file defining a static function is included in multiple
source files, each calling the function.  When debugger is aksed to jump a
line inside that function, there would be multiple locations matching the
target.  Solution in this commit is to select the location in the current
object file.

Matti Puputti (1):
  gdb, infcmd: Support jump command with same line in multiple object
    files.

 gdb/infcmd.c                       | 14 ++++++-
 gdb/testsuite/gdb.base/jump2.c     | 29 +++++++++++++++
 gdb/testsuite/gdb.base/jump2.exp   | 59 ++++++++++++++++++++++++++++++
 gdb/testsuite/gdb.base/jump2.h     | 30 +++++++++++++++
 gdb/testsuite/gdb.base/jump2_foo.c | 24 ++++++++++++
 5 files changed, 155 insertions(+), 1 deletion(-)
 create mode 100755 gdb/testsuite/gdb.base/jump2.c
 create mode 100755 gdb/testsuite/gdb.base/jump2.exp
 create mode 100755 gdb/testsuite/gdb.base/jump2.h
 create mode 100755 gdb/testsuite/gdb.base/jump2_foo.c