RE: [PATCH v5 01/12] gdb, testsuite: Extend core_find procedure to save program output.

Schimpe, Christina
2025-07-17T13:39:21Z

Hi Andrew,

Thanks for the review.

> -----Original Message-----
> From: Andrew Burgess <aburgess@redhat.com>
> Sent: Monday, July 14, 2025 2:22 PM
> To: Schimpe, Christina <christina.schimpe@intel.com>; gdb-
> patches@sourceware.org
> Cc: thiago.bauermann@linaro.org; luis.machado@arm.com
> Subject: Re: [PATCH v5 01/12] gdb, testsuite: Extend core_find procedure to save
> program output.
>
> Christina Schimpe <christina.schimpe@intel.com> writes:
>
> > From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
> >
> > The change comes from ARM's GCS series:
> >
> > [PATCH v3 5/9] GDB, gdbserver: aarch64-linux: Initial Guarded Control Stack
> support.
> >
> > We need it for testing coredmp files, too. So include it in this
> > patch series.
>
> Typo: "corecmp"

I assume you mean changing coredmp to core dump or coredump?

> With that fixed:
>
> Approved-By: Andrew Burgess <aburgess@redhat.com>
>
> Thanks,
> Andrew

Otherwise my plan for this patch would be to merge this middle next week
together with the whole series with some local nits fixed, if there are no further
bigger comments for this series.

Further nits to be fixed locally are described here:

https://sourceware.org/pipermail/gdb-patches/2025-July/219292.html

If there are some more major comments I'll of course post a v6.

Thanks,
Christina

> >
> > Abridged-by: Christina Schimpe <christina.schimpe@intel.com>
> > ---
> > This is the patch mentioned above:
> >
> > https://sourceware.org/pipermail/gdb-patches/2025-June/218892.html
> >
> > Minus everything except for the change in gdb.exp's corefind procedure.
> > ---
> > gdb/testsuite/lib/gdb.exp | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> > index 3f1cd55d727..bb17c4e91a5 100644
> > --- a/gdb/testsuite/lib/gdb.exp
> > +++ b/gdb/testsuite/lib/gdb.exp
> > @@ -9352,7 +9352,13 @@ proc remove_core {pid {test ""}} {
> > }
> > }
> >
> > -proc core_find {binfile {deletefiles {}} {arg ""}} {
> > +# Runs ${binfile} expecting it to crash and generate a core file.
> > +# If DELETEFILES is provided, remove these files after running the program.
> > +# If ARG is provided, pass it as a command line argument to the program.
> > +# If OUTPUT_FILE is provided, save the program output to it.
> > +# Returns the name of the core dump, or empty string if not found.
> > +
> > +proc core_find {binfile {deletefiles {}} {arg ""} {output_file
> > +"/dev/null"}} {
> > global objdir subdir
> >
> > set destcore "$binfile.core"
> > @@ -9374,7 +9380,7 @@ proc core_find {binfile {deletefiles {}} {arg ""}} {
> > set found 0
> > set coredir [standard_output_file coredir.[getpid]]
> > file mkdir $coredir
> > - catch "system \"(cd ${coredir}; ulimit -c unlimited; ${binfile} ${arg}; true)
> >/dev/null 2>&1\""
> > + catch "system \"(cd ${coredir}; ulimit -c unlimited; ${binfile} ${arg}; true)
> >${output_file} 2>&1\""
> > # remote_exec host "${binfile}"
> > set binfile_basename [file tail $binfile]
> > foreach i [list \
> > --
> > 2.43.0

Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Sean Fennelly, Jeffrey Schneiderman, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928