[PATCH v5 1/1] gdb, infcmd: Support jump command with same line in multiple symtabs

Eli Zaretskii eliz@gnu.org
Fri May 12 14:38:28 GMT 2023


> From: Matti Puputti <matti.puputti@intel.com>
> Cc: eliz@gnu.org,
> 	aburgess@redhat.com
> Date: Fri, 12 May 2023 15:33:20 +0200
> 
> If a header file defining a static function is included in multiple source
> files, each calling the function, and GDB is asked to jump to a line inside
> that function, there would be multiple locations matching the target.  The
> solution in this commit is to select the location in the current symtab.
> ---
>  gdb/doc/gdb.texinfo                           |  4 +-
>  gdb/infcmd.c                                  | 14 ++++-
>  .../gdb.base/jump_multiple_objfiles-foo.c     | 24 +++++++++
>  .../gdb.base/jump_multiple_objfiles.c         | 30 +++++++++++
>  .../gdb.base/jump_multiple_objfiles.exp       | 54 +++++++++++++++++++
>  .../gdb.base/jump_multiple_objfiles.h         | 30 +++++++++++
>  6 files changed, 154 insertions(+), 2 deletions(-)
>  create mode 100755 gdb/testsuite/gdb.base/jump_multiple_objfiles-foo.c
>  create mode 100755 gdb/testsuite/gdb.base/jump_multiple_objfiles.c
>  create mode 100755 gdb/testsuite/gdb.base/jump_multiple_objfiles.exp
>  create mode 100755 gdb/testsuite/gdb.base/jump_multiple_objfiles.h

Thanks, the documentation part of this is OK.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>


More information about the Gdb-patches mailing list