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] gdb: Catch exceptions if the source file is not found


On Wed, Jan 22, 2020 at 03:49:01PM +0000, Andrew Burgess wrote:
> 
> Would it be possible to create a version of this test (or similar)
> within gdb.tui/ so this fix would be protected in the future?
> 
This is reproducible on an x86_64 host/target as well. These are
the necessary step that I have to automate by a test:

$ cat > file1.c <<EOF
  extern int func2(int);
  int main()
  {
    int a = 4;
    return func2(a);
  }
  EOF
$ cat > file2.c <<EOF
  int func2(int x)
  {
    x <<= 1;
    return x+5;
  }
  EOF
$ gcc -g file1.c file2.c -o test

$ mv file1.c file1.c.moved
$ gdb -tui test.c

(gdb) start
(gdb) next
(gdb) step
      at this point we should see func2 in source window.

It is just a matter of time for me to write my _first_ test.
If the changes are OK, I will submit the test in a separate
patch if you don't mind. I just don't want this fix fall
through the cracks as apparently it did once according to
Tom.

Cheers,
Shahab


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