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

Matti Puputti matti.puputti@intel.com
Wed Mar 8 13:26:06 GMT 2023


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

-- 
2.25.1

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928



More information about the Gdb-patches mailing list