aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-10-03Automatic date update in version.inGDB Administrator1-1/+1
2017-10-02Automatic date update in version.inGDB Administrator1-1/+1
2017-10-01Automatic date update in version.inGDB Administrator1-1/+1
2017-09-30Automatic date update in version.inGDB Administrator1-1/+1
2017-09-29Automatic date update in version.inGDB Administrator1-1/+1
2017-09-28Automatic date update in version.inGDB Administrator1-1/+1
2017-09-27Automatic date update in version.inGDB Administrator1-1/+1
2017-09-26Automatic date update in version.inGDB Administrator1-1/+1
2017-09-25Automatic date update in version.inGDB Administrator1-1/+1
2017-09-24Automatic date update in version.inGDB Administrator1-1/+1
2017-09-23Automatic date update in version.inGDB Administrator1-1/+1
2017-09-22Automatic date update in version.inGDB Administrator1-1/+1
2017-09-21Automatic date update in version.inGDB Administrator1-1/+1
2017-09-20Automatic date update in version.inGDB Administrator1-1/+1
2017-09-19Automatic date update in version.inGDB Administrator1-1/+1
2017-09-18Automatic date update in version.inGDB Administrator1-1/+1
2017-09-17Automatic date update in version.inGDB Administrator1-1/+1
2017-09-16Automatic date update in version.inGDB Administrator1-1/+1
2017-09-15Automatic date update in version.inGDB Administrator1-1/+1
2017-09-14Automatic date update in version.inGDB Administrator1-1/+1
2017-09-13Automatic date update in version.inGDB Administrator1-1/+1
2017-09-12Automatic date update in version.inGDB Administrator1-1/+1
2017-09-11Automatic date update in version.inGDB Administrator1-1/+1
2017-09-10Automatic date update in version.inGDB Administrator1-1/+1
2017-09-09Automatic date update in version.inGDB Administrator1-1/+1
2017-09-08Automatic date update in version.inGDB Administrator1-1/+1
2017-09-07Bump GDB version number to 8.0.1.DATE-git.Joel Brobecker3-2/+7
gdb/ChangeLog: * version.in: Set GDB version number to 8.0.1.DATE-git. * PROBLEMS: Likewise.
2017-09-07Document the GDB 8.0.1 release in gdb/ChangeLogJoel Brobecker1-0/+4
gdb/ChangeLog: GDB 8.0.1 released.
2017-09-07Set GDB version number to 8.0.1.gdb-8.0.1-releaseJoel Brobecker3-2/+7
gdb/ChangeLog: * version.in: Set GDB version number to 8.0.1. * PROBLEMS: Likewise.
2017-09-07Automatic date update in version.inGDB Administrator1-1/+1
2017-09-06Automatic date update in version.inGDB Administrator1-1/+1
2017-09-05Test different follow-exec-mode settings in gdb.multi/multi-arch-exec.expSimon Marchi2-7/+23
Using follow-exec-mode "new" takes a different code path than "same", so it's interesting to test this path in combination with a change in architecture of the inferior. This test fails if you remove the previous patch. gdb/testsuite/ChangeLog: * gdb.multi/multi-arch-exec.exp: Test with different "follow-exec-mode" settings. (do_test): New procedure.
2017-09-05Add thread after updating gdbarch when exec'ingSimon Marchi2-1/+10
As mentioned in the previous patch, we should avoid doing register reads after a process does an exec and before we've updated that inferior's gdbarch. Otherwise, we may interpret the registers using the wrong architecture. When a process does an exec with "follow-exec-mode new", a new inferior is added by follow_exec. The gdbarch of that new inferior is at first set to some default value, probably specific to the gdb build (I get "i386" here), which may not be the right one. It is updated later by the call to target_find_description. Before that point, if we try to read the inferior's registers, we may not interpret them correctly. This has been exposed by a failure in gdb.base/foll-exec-mode.exp after the previous patch, with: Remote 'g' packet reply is too long (expected 312 bytes, got 816 bytes) The call to "add_thread" done just after adding the inferior is problematic, because it ends up reading the registers (because the ptid is re-used, we end up doing a switch_to_thread to it, which tries to update stop_pc). The registers returned by gdbserver are the x86-64 ones, while we try to interpret them using the "i386" gdbarch. Postponing the call to add_thread to until the target description/gdbarch has been updated seems to fix the issue. As to why this issue was uncovered by the previous patch: what I think happened before that patch is that since we were updating stop_pc before switching to the new inferior, we were filling the regcache associated to the ptid (this worked fine as long as the architectures of the previous and new process images were the same). The call to switch_to_thread then worked, because the register read hit the regcache. Now, it triggers a register read, while the gdbarch is not set correctly, leading to the "reply is too long" error. If this is right, it sounds wrong that we delete and re-add a thread with the same ptid, and are able to access the registers from the deleted thread. When we delete a thread, should we clear the regcache associated to that ptid, so that the new thread starts with a fresh/empty regcache? gdb/ChangeLog: * infrun.c (follow_exec): Call add_thread after target_find_description.
2017-09-05Read stop_pc after updating the gdbarch when exec'ingSimon Marchi2-2/+7
When an inferior execs and changes architecture (e.g. 64 bits to 32 bits), the gdbarch associated to the inferior is updated by the follow_exec call in handle_inferior_event_1. We should avoid doing any register read before that point, because the registers sent by the remote side will be those of the new architecture, but we would interpret them using the old architecture. We do just that by setting stop_pc during this window, which obviously requires reading the registers. This results in gdb.multi/multi-arch-exec.exp failing, GDB outputting the following error: Truncated register 50 in remote 'g' packet This patch fixes that by postponing the setting of stop_pc to after we've updated the inferior gdbarch. This bug was hiding another problem, and as such introduces some failures in gdb.base/foll-exec-mode.exp. The following patch takes care of that. gdb/ChangeLog: * infrun.c (handle_inferior_event_1): When exec'ing, read stop_pc after follow_exec.
2017-09-05Improve "'g' reply is is to long" error messageSimon Marchi2-1/+6
... by adding the expected size, and the received size. I found this useful when debugging gdbarch/remote issues, since it gives a hint of what gdb expects and what the remote sent. gdb/ChangeLog: * remote.c (process_g_packet): Update error message.
2017-09-05Define an error function in the PPC simulator library.John Baldwin2-0/+15
Previously this used the error function from GDB directly when linked against GDB instead of the error method in the host callbacks structure. This was exposed via a link error when GDB was converted to C++. The error function invokes the error callback similar to sim_io_error. Note that there are also error functions in sim/ppc/main.c and sim/ppc/misc.c. The ppc libsim.a expects each consumer to provide several symbols used by the library including "error". sim-calls.c provides these symbols when the library is linked into gdb. The dgen, igen, tmp-filter, tmp-ld-decode, tmp-ld-cache, and tmp-ld-insn programs use the functions from misc.c. psim uses the functions from main.c. sim/ppc/ChangeLog: PR sim/20863 * sim_calls.c (error): New function.
2017-09-05Automatic date update in version.inGDB Administrator1-1/+1
2017-09-04Automatic date update in version.inGDB Administrator1-1/+1
2017-09-03Automatic date update in version.inGDB Administrator1-1/+1
2017-09-02Automatic date update in version.inGDB Administrator1-1/+1
2017-09-01PR gdb/22046: Fix T-stopped detach regression on old Linux kernelsJan Kratochvil2-3/+9
On <=RHEL6 hosts Fedora/RHEL GDB started to 'kill -STOP' all processes it detached. Even those not originally T-stopped. This is a Fedora-specific patch which is based on upstream GDB's PROC_STATE_STOPPED state. I believe (I did not verify) this patch did regress it: commit d617208bb06bd461b52ce041d89f7127e3044762 Author: Pedro Alves <palves@redhat.com> Date: Mon Jul 25 12:42:17 2016 +0100 linux-procfs: Introduce enum proc_state As originally there was strstr() but now there is strcmp() and so the missing trailing '\n' no longer matches. The Bug was found by Michal Kolar. Reproducibility: $ gdb -p $PID (gdb) quit $ ... Actual results: === RHEL6.9 x86_64 # scl enable devtoolset-7 bash RHEL6.9 x86_64 # which gdb /opt/rh/devtoolset-7/root/usr/bin/gdb RHEL6.9 x86_64 # ./testcase.sh 24737 pts/0 S+ 0:00 /bin/sleep 4 24737 pts/0 T+ 0:00 /bin/sleep 4 RHEL6.9 x86_64 # === Expected results: === RHEL6.9 x86_64 # which gdb /usr/bin/gdb RHEL6.9 x86_64 # ./testcase.sh 24708 pts/0 S+ 0:00 /bin/sleep 4 24708 pts/0 S+ 0:00 /bin/sleep 4 ./testcase.sh: line 20: kill: (24708) - No such process RHEL6.9 x86_64 # === gdb/ChangeLog 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com> PR gdb/22046 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED detection.
2017-09-01Automatic date update in version.inGDB Administrator1-1/+1
2017-08-31Automatic date update in version.inGDB Administrator1-1/+1
2017-08-30Automatic date update in version.inGDB Administrator1-1/+1
2017-08-29Automatic date update in version.inGDB Administrator1-1/+1
2017-08-28define_command: Don't convert command name to lower caseSimon Marchi4-6/+41
Commit Command names: make them case sensitive 3d7b173c29900879c9a5958dd6029fd36666e57c made command name lookup case sensitive. However, define_command, used when creating a user-defined command, converts the command name to lowercase, assuming that the command name lookup works in a case insensitive way. This causes user-defined commands with capital letters in their name to only be callable with a lowercase version: (gdb) define Foo Type commands for definition of "Foo". End with a line saying just "end". >print 1 >end (gdb) Foo Undefined command: "Foo". Try "help". (gdb) foo $1 = 1 This patch removes that conversion to lowercase, so that the user can call the command with the same name they provided. gdb/ChangeLog: * cli/cli-script.c (define_command): Don't convert command name to lower case. gdb/testsuite/ChangeLog: * gdb.base/commands.exp (user_defined_command_case_sensitivity): New proc, call it from toplevel.
2017-08-28Automatic date update in version.inGDB Administrator1-1/+1
2017-08-27Automatic date update in version.inGDB Administrator1-1/+1
2017-08-26Automatic date update in version.inGDB Administrator1-1/+1
2017-08-25Automatic date update in version.inGDB Administrator1-1/+1