This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix regression in -file-list-exec-source-files command.


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]