Skip to content
Snippets Groups Projects
  • Tom de Vries's avatar
    81a7a72f
    [gdb/testsuite] Fix gdb.arch/amd64*.exp with local-remote-host-native.exp · 81a7a72f
    Tom de Vries authored
    There's a number of gdb.arch/amd64*.exp test-cases that fail with host+target
    board local-remote-host-native.exp because of using a .S file, generated from
    a .c file.
    
    If a test-case compiles the .S file when executing on remote host,
    the .S file is already copied from build to host, such that it's available for
    the compiler.
    
    But that's not the case for the .c file, which is needed by gdb to show a
    source line:
    ...
    (gdb) continue^M
    Continuing.^M
    ^M
    Breakpoint 2, fn2 (y=y@entry=25, x=x@entry=6) at amd64-entry-value-inline.c:32^M
    32      in gdb.arch/amd64-entry-value-inline.c^M
    (gdb) FAIL: gdb.arch/amd64-entry-value-inline.exp: continue to breakpoint: \
      break-here
    ...
    
    Fix this by using "gdb_remote_download host <.c file>".
    
    Tested on x86_64-linux, with host+target board local-remote-host-native.
    81a7a72f
    History
    [gdb/testsuite] Fix gdb.arch/amd64*.exp with local-remote-host-native.exp
    Tom de Vries authored
    There's a number of gdb.arch/amd64*.exp test-cases that fail with host+target
    board local-remote-host-native.exp because of using a .S file, generated from
    a .c file.
    
    If a test-case compiles the .S file when executing on remote host,
    the .S file is already copied from build to host, such that it's available for
    the compiler.
    
    But that's not the case for the .c file, which is needed by gdb to show a
    source line:
    ...
    (gdb) continue^M
    Continuing.^M
    ^M
    Breakpoint 2, fn2 (y=y@entry=25, x=x@entry=6) at amd64-entry-value-inline.c:32^M
    32      in gdb.arch/amd64-entry-value-inline.c^M
    (gdb) FAIL: gdb.arch/amd64-entry-value-inline.exp: continue to breakpoint: \
      break-here
    ...
    
    Fix this by using "gdb_remote_download host <.c file>".
    
    Tested on x86_64-linux, with host+target board local-remote-host-native.