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 0/2] Better handling of slow remote transfers


Joel Brobecker wrote:
> > At any rate, I think the default behaviour for 7.10
> > has to be the default behaviour of 7.9
> > (given that, for example, we're not going to make file transfer
> > more adequately interruptible for 7.10).
> 
> That makes sense to me.

If we are to reset the default sysroot to "" then please consider the
series I posted that added the auto-target-prefix functionality:

  https://sourceware.org/ml/gdb-patches/2015-07/msg00828.html

With these patches the "target:" prefix is only enabled if the user
does "target remote" with no sysroot or file specified, a case that
in 7.9 would result in a debug session with no symbols.
  
This has the following matrix of behaviours:

  * User wants to supply the file and not have libraries fetched
    (Sandra Loosemore's use case):

      bash$ gdb
      (gdb) file ./a.out
      (gdb) target remote :9999

    and:
      
      bash$ gdb ./a.out
      (gdb) target remote :9999

    7.9  -> no files transferred
    7.10 -> no files transferred

  * User wants to specify a file AND have GDB pull libraries from
    the remote:

      bash$ gdb
      (gdb) file ./a.out
      (gdb) set sysroot remote:
      (gdb) target remote :9999

    and:
    
      bash$ gdb ./a.out
      (gdb) set sysroot remote:
      (gdb) target remote :9999
      
    7.9  -> libraries transferred, executable read locally
    7.10 -> libraries transferred, executable read locally

  * User wants to connect to remote target and have GDB do the work:

      bash$ gdb
      (gdb) target remote :9999

    7.9  -> no files transferred, debug session with no symbols
    7.10 -> all files transferred, debug session with symbols

If the user actually wants to debug with no symbols at all they can
do this:

  bash$ gdb
  (gdb) set auto-target-prefix off
  (gdb) target remote :9999

With this series all 7.9 use cases are supported, and only the use
case where the user wants no symbols requires extra typing.  Most
users are going to want symbols, and any user capable of debugging
without symbols is capable of adding a line to their .gdbinit.

Thanks,
Gary
   
-- 
http://gbenson.net/


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