aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-04-05Automatic date update in version.inGDB Administrator1-1/+1
2018-04-04i386: Clear vex instead of vex.evexH.J. Lu5-6/+30
"vex" has many fields to control how to decode an instruction. Clear all fields in "vex" before decoding an instruction to avoid using values left from the previous instruction. gas/ PR gdb/23028 PR binutils/23025 * testsuite/gas/i386/prefix.s: Add tests for vcvtpd2dq with VEX and EVEX prefixes. * testsuite/gas/i386/prefix.d: Updated. opcodes/ PR gdb/23028 PR binutils/23025 * i386-dis.c (get_valid_dis386): Don't set vex.prefix nor vex.w to 0. (print_insn): Clear vex instead of vex.evex. (cherry picked from commit caf0678c84b5b55fbc4bcc853954745a4ad8b658)
2018-04-04Automatic date update in version.inGDB Administrator1-1/+1
2018-04-03Automatic date update in version.inGDB Administrator1-1/+1
2018-04-02Automatic date update in version.inGDB Administrator1-1/+1
2018-04-01Automatic date update in version.inGDB Administrator1-1/+1
2018-03-31Automatic date update in version.inGDB Administrator1-1/+1
2018-03-30Automatic date update in version.inGDB Administrator1-1/+1
2018-03-29Automatic date update in version.inGDB Administrator1-1/+1
2018-03-28Automatic date update in version.inGDB Administrator1-1/+1
2018-03-27Automatic date update in version.inGDB Administrator1-1/+1
2018-03-26Automatic date update in version.inGDB Administrator1-1/+1
2018-03-25Automatic date update in version.inGDB Administrator1-1/+1
2018-03-24Automatic date update in version.inGDB Administrator1-1/+1
2018-03-23Automatic date update in version.inGDB Administrator1-1/+1
2018-03-22Automatic date update in version.inGDB Administrator1-1/+1
2018-03-21Automatic date update in version.inGDB Administrator1-1/+1
2018-03-20Automatic date update in version.inGDB Administrator1-1/+1
2018-03-19Automatic date update in version.inGDB Administrator1-1/+1
2018-03-18Automatic date update in version.inGDB Administrator1-1/+1
2018-03-17Automatic date update in version.inGDB Administrator1-1/+1
2018-03-16Automatic date update in version.inGDB Administrator1-1/+1
2018-03-15Automatic date update in version.inusers/ARM/embedded-gdb-8.1-branch-2018q2GDB Administrator1-1/+1
2018-03-14Automatic date update in version.inGDB Administrator1-1/+1
2018-03-13Automatic date update in version.inGDB Administrator1-1/+1
2018-03-12Automatic date update in version.inGDB Administrator1-1/+1
2018-03-11Automatic date update in version.inGDB Administrator1-1/+1
2018-03-10Automatic date update in version.inGDB Administrator1-1/+1
2018-03-09Automatic date update in version.inGDB Administrator1-1/+1
2018-03-08Automatic date update in version.inGDB Administrator1-1/+1
2018-03-07Automatic date update in version.inGDB Administrator1-1/+1
2018-03-06Automatic date update in version.inGDB Administrator1-1/+1
2018-03-05Automatic date update in version.inGDB Administrator1-1/+1
2018-03-04Automatic date update in version.inGDB Administrator1-1/+1
2018-03-03Automatic date update in version.inGDB Administrator1-1/+1
2018-03-02Conditionally include "<windows.h>" on common/pathstuff.c (and unbreak build ↵Sergio Durigan Junior2-0/+9
on mingw*) commit b4987c956dfa44ca9fd8552f63e15f5fa094b2a4 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>".
2018-03-02Automatic date update in version.inGDB Administrator1-1/+1
2018-02-28Change order of error message printed when gdbserver can't find CWDSergio Durigan Junior2-1/+6
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.
2018-02-28Make gdbserver work with filename-only binariesSergio Durigan Junior11-47/+205
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.
2018-02-28Create new common/pathstuff.[ch]Sergio Durigan Junior24-129/+278
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".
2018-03-01Automatic date update in version.inGDB Administrator1-1/+1
2018-02-28Automatic date update in version.inGDB Administrator1-1/+1
2018-02-27Automatic date update in version.inGDB Administrator1-1/+1
2018-02-26Automatic date update in version.inGDB Administrator1-1/+1
2018-02-25Automatic date update in version.inGDB Administrator1-1/+1
2018-02-24Automatic date update in version.inGDB Administrator1-1/+1
2018-02-23Automatic date update in version.inGDB Administrator1-1/+1
2018-02-22Automatic date update in version.inGDB Administrator1-1/+1
2018-02-21Automatic date update in version.inGDB Administrator1-1/+1
2018-02-20Automatic date update in version.inGDB Administrator1-1/+1