1. 15 Mar, 2018 1 commit
  2. 14 Mar, 2018 1 commit
  3. 13 Mar, 2018 1 commit
  4. 12 Mar, 2018 1 commit
  5. 11 Mar, 2018 1 commit
  6. 10 Mar, 2018 1 commit
  7. 09 Mar, 2018 1 commit
  8. 08 Mar, 2018 1 commit
  9. 07 Mar, 2018 1 commit
  10. 06 Mar, 2018 1 commit
  11. 05 Mar, 2018 1 commit
  12. 04 Mar, 2018 1 commit
  13. 03 Mar, 2018 1 commit
  14. 02 Mar, 2018 2 commits
    • Sergio Durigan Junior's avatar
      Conditionally include "<windows.h>" on common/pathstuff.c (and unbreak build on mingw*) · a74e30b2
      Sergio Durigan Junior authored
      commit b4987c95
      Author: Sergio Durigan Junior <sergiodj@redhat.com>
      Date:   Fri Feb 9 18:44:59 2018 -0500
      
          Create new common/pathstuff.[ch]
      
      Introduced a regression when compiling for mingw*:
      
        /gdb/common/pathstuff.c: In function 'gdb::unique_xmalloc_ptr<char>
        gdb_realpath(const char*)':
        /gdb/common/pathstuff.c:56:14: error: 'MAX_PATH' was not declared in this scope
             char buf[MAX_PATH];
      		^
        /gdb/common/pathstuff.c:57:5: error: 'DWORD' was not declared in this scope
             DWORD len = GetFullPathName (filename, MAX_PATH, buf, NULL);
             ^
        /gdb/common/pathstuff.c:57:11: error: expected ';' before 'len'
             DWORD len = GetFullPathName (filename, MAX_PATH, buf, NULL);
      	     ^
        /gdb/common/pathstuff.c:63:9: error: 'len' was not declared in this scope
             if (len > 0 && len < MAX_PATH)
      	   ^
        /gdb/common/pathstuff.c:64:54: error: 'buf' was not declared in this scope
      	 return gdb::unique_xmalloc_ptr<char> (xstrdup (buf));
      							^
        make[2]: *** [pathstuff.o] Error 1
      
      The proper fix is to conditionally include "<windows.h>".  This commit
      does that, without introducing any regressions as per tests made by
      our BuildBot.
      
      gdb/ChangeLog:
      2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	PR gdb/22907
      	* common/pathstuff.c: Conditionally include "<windows.h>".
      a74e30b2
    • GDB Administrator's avatar
      Automatic date update in version.in · ced18bb5
      GDB Administrator authored
      ced18bb5
  15. 01 Mar, 2018 4 commits
    • Sergio Durigan Junior's avatar
      Change order of error message printed when gdbserver can't find CWD · 506817a3
      Sergio Durigan Junior authored
      I forgot to address Pedro's comment about my last patch and change the
      order of the message printed when getcwd returns NULL on gdbserver.
      This obvious commit does it.
      
      gdb/gdbserver/ChangeLog:
      2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	* server.c (captured_main): Change order of error message printed
      	when the current working directory cannot be found.
      506817a3
    • Sergio Durigan Junior's avatar
      Make gdbserver work with filename-only binaries · 2441702a
      Sergio Durigan Junior authored
      Simon mentioned on IRC that, after the startup-with-shell feature has
      been implemented on gdbserver, it is not possible to specify a
      filename-only binary, like:
      
        $ gdbserver :1234 a.out
        /bin/bash: line 0: exec: a.out: not found
        During startup program exited with code 127.
        Exiting
      
      This happens on systems where the current directory "." is not listed
      in the PATH environment variable.  Although including "." in the PATH
      variable is a possible workaround, this can be considered a regression
      because before startup-with-shell it was possible to use only the
      filename (due to reason that gdbserver used "exec*" directly).
      
      The idea of the patch is to verify if the program path provided by the
      user (or by the remote protocol) contains a directory separator
      character.  If it doesn't, it means we're dealing with a filename-only
      binary, so we call "gdb_abspath" to properly expand it and transform
      it into a full path.  Otherwise, we leave the program path untouched.
      This mimicks the behaviour seen on GDB (look at "openp" and
      "attach_inferior", for example).
      
      I am also submitting a testcase which exercises the scenario described
      above.  This test requires gdbserver to be executed in a different CWD
      than the original, so I also created a helper function, "with_cwd" (on
      testsuite/lib/gdb.exp), which takes care of cd'ing into and out of the
      specified dir.
      
      Built and regtested on BuildBot, without regressions.
      
      gdb/ChangeLog:
      2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
      	    Simon Marchi  <simon.marchi@polymtl.ca>
      
      	* common/common-utils.c: Include "sys/stat.h".
      	(is_regular_file): Move here from "source.c"; change return
      	type to "bool".
      	* common/common-utils.h (is_regular_file): New prototype.
      	* common/pathstuff.c (contains_dir_separator): New function.
      	* common/pathstuff.h (contains_dir_separator): New prototype.
      	* source.c: Don't include "sys/stat.h".
      	(is_regular_file): Move to "common/common-utils.c".
      
      gdb/gdbserver/ChangeLog:
      2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	* server.c: Include "filenames.h" and "pathstuff.h".
      	(program_name): Delete variable.
      	(program_path): New anonymous class.
      	(get_exec_wrapper): Use "program_path" instead of
      	"program_name".
      	(handle_v_run): Likewise.
      	(captured_main): Likewise.
      	(process_serial_event): Likewise.
      
      gdb/testsuite/ChangeLog:
      2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	* gdb.server/abspath.exp: New file.
      	* lib/gdb.exp (with_cwd): New procedure.
      2441702a
    • Sergio Durigan Junior's avatar
      Create new common/pathstuff.[ch] · 6d607b88
      Sergio Durigan Junior authored
      This commit moves the path manipulation routines found on utils.c to a
      new common/pathstuff.c, and updates the Makefile.in's accordingly.
      The routines moved are "gdb_realpath", "gdb_realpath_keepfile" and
      "gdb_abspath".
      
      This will be needed because gdbserver will have to call "gdb_abspath"
      on my next patch, which implements a way to expand the path of the
      inferior provided by the user in order to allow specifying just the
      binary name when starting gdbserver, like:
      
        $ gdbserver :1234 a.out
      
      With the recent addition of the startup-with-shell feature on
      gdbserver, this scenario doesn't work anymore if the user doesn't have
      the current directory listed in the PATH variable.
      
      I had to do a minor adjustment on "gdb_abspath" because we don't have
      access to "tilde_expand" on gdbserver, so now the function is using
      "gdb_tilde_expand" instead.  Otherwise, the code is the same.
      
      Regression tested on the BuildBot, without regressions.
      
      gdb/ChangeLog:
      2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	* Makefile.in (SFILES): Add "common/pathstuff.c".
      	(HFILES_NO_SRCDIR): Add "common/pathstuff.h".
      	(COMMON_OBS): Add "pathstuff.o".
      	* auto-load.c: Include "common/pathstuff.h".
      	* common/common-def.h (current_directory): Move here.
      	* common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
      	function.
      	* common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
      	prototype.
      	* common/pathstuff.c: New file.
      	* common/pathstuff.h: New file.
      	* compile/compile.c: Include "common/pathstuff.h".
      	* defs.h (current_directory): Move to "common/common-defs.h".
      	* dwarf2read.c: Include "common/pathstuff.h".
      	* exec.c: Likewise.
      	* guile/scm-safe-call.c: Likewise.
      	* linux-thread-db.c: Likewise.
      	* main.c: Likewise.
      	* nto-tdep.c: Likewise.
      	* objfiles.c: Likewise.
      	* source.c: Likewise.
      	* symtab.c: Likewise.
      	* utils.c: Include "common/pathstuff.h".
      	(gdb_realpath): Move to "common/pathstuff.c".
      	(gdb_realpath_keepfile): Likewise.
      	(gdb_abspath): Likewise.
      	* utils.h (gdb_realpath): Move to "common/pathstuff.h".
      	(gdb_realpath_keepfile): Likewise.
      	(gdb_abspath): Likewise.
      
      gdb/gdbserver/ChangeLog:
      2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
      
      	* Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
      	(OBJS): Add "pathstuff.o".
      	* server.c (current_directory): New global variable.
      	(captured_main): Initialize "current_directory".
      6d607b88
    • GDB Administrator's avatar
      Automatic date update in version.in · 381665f8
      GDB Administrator authored
      381665f8
  16. 28 Feb, 2018 1 commit
  17. 27 Feb, 2018 1 commit
  18. 26 Feb, 2018 1 commit
  19. 25 Feb, 2018 1 commit
  20. 24 Feb, 2018 1 commit
  21. 23 Feb, 2018 1 commit
  22. 22 Feb, 2018 1 commit
  23. 21 Feb, 2018 1 commit
  24. 20 Feb, 2018 1 commit
  25. 19 Feb, 2018 1 commit
  26. 18 Feb, 2018 1 commit
  27. 17 Feb, 2018 1 commit
  28. 16 Feb, 2018 1 commit
  29. 15 Feb, 2018 2 commits
  30. 14 Feb, 2018 1 commit
  31. 13 Feb, 2018 1 commit
  32. 12 Feb, 2018 1 commit
  33. 11 Feb, 2018 1 commit
  34. 10 Feb, 2018 1 commit
  35. 09 Feb, 2018 1 commit