[PATCHv2,0/2] Fix regression passing core files on GDB command line

Message ID cover.1732544034.git.aburgess@redhat.com
Headers
Series Fix regression passing core files on GDB command line |

Message

Andrew Burgess Nov. 25, 2024, 2:16 p.m. UTC
  My recent work on filename completion managed to break some cases for
passing a core file to GDB from the command line.

Patch #1 is a minor cleanup.

Patch #2 fixes the regression.

--

In v2:

 - Rebased onto something closer to HEAD,

 - Renamed to new escaping function from make_quoted_filename to
   make_quoted_string, and moved it to gdbsupport/common-utils.{cc,h}.
   Some locals within the function changed, but the actual algorithm
   is unchanged.

Thanks,
Andrew

---

Andrew Burgess (2):
  gdb: make core_target_open static
  gdb: allow core file containing special characters on the command line

 gdb/corelow.c                       |   8 +-
 gdb/gdbcore.h                       |   4 -
 gdb/main.c                          |  17 ++--
 gdb/testsuite/gdb.base/corefile.exp | 116 +++++++++++++---------------
 gdbsupport/common-utils.cc          |  21 +++++
 gdbsupport/common-utils.h           |   5 ++
 6 files changed, 94 insertions(+), 77 deletions(-)


base-commit: 66df4f72b64b18b089b5a1a715230885ce0aaf14
  

Comments

Andrew Burgess Dec. 9, 2024, 11:14 a.m. UTC | #1
Andrew Burgess <aburgess@redhat.com> writes:

> My recent work on filename completion managed to break some cases for
> passing a core file to GDB from the command line.
>
> Patch #1 is a minor cleanup.
>
> Patch #2 fixes the regression.

I've checked this in as I think it's important to address this
regression before we branch.  If there's any feedback I'm always happy
to address it.

Thanks,
Andrew