This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix regression in -file-list-exec-source-files command.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 19 Aug 2010 12:01:21 +0200
- Subject: Re: [PATCH] Fix regression in -file-list-exec-source-files command.
- References: <1282209516-3612-1-git-send-email-brobecker@adacore.com>
> This was tested on x86_64-linux in HEAD. I'll see whether it's possible
> to create a regression test or not, next.
The problem that I am seeing is that, in the testsuite, we compile the
examples using the source full filenames. For instance, using
gdb.base/arrayidx.exp, we do:
% gcc /[...]/gdb.base/arrayidx.c -g -lm -o [...]
As a result, the filename field ends up containing the fullname:
(gdb) interpreter-exec mi -file-list-exec-source-files
^done,files=[{file="/[...]/gdb.base/arrayidx.c",fullname="/[...]/gdb.base/arrayidx.c"}, [...]
Because of that, we cannot use one of our source files to demonstrate
the problem.
The only thing I can think of that we could use to demonstrate the problem
is to check for empty filenames. Before the patch was applied, one of
the entries looked like this:
{file="",fullname="init.c"}
There is no guaranty that this is going to happen on all platforms,
or even appear consistently on a given platform. This is probably
dependent on the compiler as well as the way system libraries such
as the C library have been built. But I suppose that is better than
nothing.
--
Joel