aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/ChangeLog
AgeCommit message (Collapse)AuthorFilesLines
2014-01-20gdb: xtensa: fix linux ptrace includesBaruch Siach1-0/+5
Currently, xtensa code using the Linux ptrace interface only include sys/ptrace.h. This file comes from the C library (glibc and uClibc, at least), and includes a declaration of the ptrace() functions, along with some cross architecture constants that are mostly copied from the file located at include/uapi/linux/ptrace.h in recent Linux kernels. For xtensa specific constants like PTRACE_GETXTREGS and PTRACE_SETXTREGS the asm/ptrace.h include from the Linux kernel UAPI is needed. The code in gdbserver xtensa specific part doesn't call ptrace() directly, so we can remove the unneeded sys/ptrace.h include. The gdb xtensa specific code needs both headers, since it calls ptrace(). gdb/ * xtensa-linux-nat.c: Include asm/ptrace.h. gdb/gdbserver/ * linux-xtensa-low.c: Include asm/ptrace.h instead of sys/ptrace.h.
2014-01-17Fix PR mention in gdb/gdbserver/ChangeLog's previous change.Pedro Alves1-1/+1
2014-01-17Fix silly ChangeLog entry in previous change.Pedro Alves1-2/+2
2014-01-17Fix PR PR16445 - gdbserver build failure on x86.Pedro Alves1-0/+6
If gdb_proc_service.h ends up including linux/elf.h, we'll trip on duplicate definitions: In file included from ../../../gdb/gdbserver/linux-x86-low.c:29:0: ../../../gdb/gdbserver/../../include/elf/common.h:36:0: error: "ELFMAG0" redefined [-Werror] ... etc ... Handle this the same way linux-low.c and linux-arm-low.c handle this. gdb/gdbserver/ 2014-01-17 Pedro Alves <palves@redhat.com> PR PR16445 * linux-x86-low.c (linux-x86-low.c): Don't include elf/common.h if ELFMAG0 is defined after including gdb_proc_service.h.
2014-01-16 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.Doug Evans1-0/+5
(match_dll): Use it.
2014-01-16btrace, gdbserver: read branch trace incrementallyMarkus Metzger1-0/+10
Read branch trace data incrementally and extend the current trace rather than discarding it and reading the entire trace buffer each time. If the branch trace buffer overflowed, we can't extend the current trace so we discard it and start anew by reading the entire branch trace buffer. 2014-01-16 Markus Metzger <markus.t.metzger@intel.com> * common/linux-btrace.c (perf_event_read_bts, linux_read_btrace): Support delta reads. (linux_disable_btrace): Change return type. * common/linux-btrace.h (linux_read_btrace): Change parameters and return type to allow error reporting. Update users. (linux_disable_btrace): Change return type. Update users. * common/btrace-common.h (btrace_read_type) <BTRACE_READ_DELTA>: New. (btrace_error): New. (btrace_block) <begin>: Comment on BEGIN == 0. * btrace.c (btrace_compute_ftrace): Start from the end of the current trace. (btrace_stitch_trace, btrace_clear_history): New. (btrace_fetch): Read delta trace, return if replaying. (btrace_clear): Move clear history code to btrace_clear_history. (parse_xml_btrace): Throw an error if parsing failed. * target.h (struct target_ops) <to_read_btrace>: Change parameters and return type to allow error reporting. (target_read_btrace): Change parameters and return type to allow error reporting. * target.c (target_read_btrace): Update. * remote.c (remote_read_btrace): Support delta reads. Pass errors on. * NEWS: Announce it. gdbserver/ * target.h (target_ops) <read_btrace>: Change parameters and return type to allow error reporting. * server.c (handle_qxfer_btrace): Support delta reads. Pass trace reading errors on. * linux-low.c (linux_low_read_btrace): Pass trace reading errors on. (linux_low_disable_btrace): New.
2014-01-15delete thread_id_to_gdb_id, unusedDoug Evans1-0/+5
* inferiors.c (thread_id_to_gdb_id): Delete. * inferiors.h (thread_id_to_gdb_id): Delete.
2014-01-13Fix MinGW compilation errors in gdbserver/.Eli Zaretskii1-0/+6
gdb/gdbserver/Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC versions.
2014-01-08GDBserver: Discard previous queued events when GDB disconnects.Pedro Alves1-0/+6
... not when a new GDB connection sends the status packet ('?'). Mainly just a cleanup/simplification, as GDB always sends '?' first. Tested on x86_64 Fedora 17. 2014-01-08 Pedro Alves <palves@redhat.com> * server.c (handle_status): Don't discard previous queued stop replies or thread's pending status here. (main) <disconnection>: Do it here instead.
2014-01-08[remote/gdbserver] Don't lose signals when reconnecting.Pedro Alves1-0/+18
Currently, when GDB connects in all-stop mode, GDBserver always responds to the status packet with a GDB_SIGNAL_TRAP, even if the program is actually stopped for some other signal. (gdb) tar rem ... ... (gdb) c Program received signal SIGUSR1, User defined signal 1. (gdb) disconnect (gdb) tar rem ... (gdb) c (Or a GDB crash instead of an explicit disconnect.) This results in the program losing that signal on that last continue, because gdb will tell the target to resume with no signal (to suppress the GDB_SIGNAL_TRAP, due to 'handle SISGTRAP nopass'), and that will actually suppress the real signal the program had stopped for (SIGUSR1). To fix that, I think we should make GDBserver report the real signal the thread had stopped for in response to the status packet: @item ? @cindex @samp{?} packet Indicate the reason the target halted. The reply is the same as for step and continue. But, that raises the question -- which thread are we reporting the status for? Due to how the RSP in all-stop works, we can only report one status. The status packet's response is a stop reply packet, so it includes the thread identifier, so it's not a problem packet-wise. However, GDBserver is currently always reporting the status for first thread in the thread list, even though that may well not be the thread that got the signal that caused the program to stop. So the next logical step would be to report the status for the last_ptid/last_status thread (the last event reported to gdb), if it's still around; and if not, fallback to some other thread. There's an issue on the GDB side with that, though... GDB currently always adds the thread reported in response to the status query as the first thread in its list. That means that if we start with e.g., (gdb) info threads 3 Thread 1003 ... * 2 Thread 1002 ... 1 Thread 1001 ... And reconnect: (gdb) disconnect (gdb) tar rem ... We end up with: (gdb) info threads 3 Thread 1003 ... 2 Thread 1001 ... * 1 Thread 1002 ... Not a real big issue, but it's reasonably fixable, by having GDB fetch/sync the thread list before fetching the status/'?', and then using the status to select the right thread as current on the GDB side. Holes in the thread numbers are squashed before/after reconnection (e.g., 2,3,5 becomes 1,2,3), but the order is preserved, which I think is both good, and good enough. However (yes, there's more...), the previous GDB that was connected might have had gdbserver running in non-stop mode, or could have left gdbserver doing disconnected tracing (which also forces non-stop), and if the new gdb/connection is in all-stop mode, we can end up with more than one thread with a signal to report back to gdb. As we can only report one thread/status (in the all-stop RSP variant; the non-stop variant doesn't have this issue), we get to do what we do at every other place we have this situation -- leave events we can't report right now as pending, so that the next resume picks them up. Note all this ammounts to a QoI change, within the existing framework. There's really no RSP change here. The only user visible change (other than that the signal is program is stopped at isn't lost / is passed to the program), is in "info program", that now can show the signal the program stopped for. Of course, the next resume will respect the pass/nopass setting for the signal in question. It'd be reasonable to have the initial connection tell the user the program was stopped with a signal, similar to when we load a core to debug, but I'm leaving that out for a future change. I think we'll need to either change how handle_inferior_event & co handle stop_soon, or maybe bypass them completely (like fork-child.c:startup_inferior) for that. Tested on x86_64 Fedora 17. gdb/gdbserver/ 2014-01-08 Pedro Alves <palves@redhat.com> * gdbthread.h (struct thread_info) <status_pending_p>: New field. * server.c (visit_actioned_threads, handle_pending_status): New function. (handle_v_cont): Factor out parts to ... (resume): ... this new function. If in all-stop, and a thread being resumed has a pending status, report it without actually resuming. (myresume): Adjust to use the new 'resume' function. (clear_pending_status_callback, set_pending_status_callback) (find_status_pending_thread_callback): New functions. (handle_status): Handle the case of multiple threads having interesting statuses to report. Report threads' real last signal instead of always reporting GDB_SIGNAL_TRAP. Look for a thread with an interesting thread to report the status for, instead of always reporting the status of the first thread. gdb/ 2014-01-08 Pedro Alves <palves@redhat.com> * remote.c (remote_add_thread): Add threads silently if starting up. (remote_notice_new_inferior): If in all-stop, and starting up, don't call notice_new_inferior. (get_current_thread): New function, factored out from ... (add_current_inferior_and_thread): ... this. Adjust. (remote_start_remote) <all-stop>: Fetch the thread list. If we found any thread, then select the remote's current thread as GDB's current thread too. gdb/testsuite/ 2014-01-08 Pedro Alves <palves@redhat.com> * gdb.threads/reconnect-signal.c: New file. * gdb.threads/reconnect-signal.exp: New file.
2014-01-01Update copyright year in gdb/gdbserver/gdbreplay version output.Joel Brobecker1-0/+5
gdb/ChangeLog: * top.c (print_gdb_version): Set copyright year to 2014. gdb/gdbserver/ChangeLog: * gdbserver.c (gdbserver_version): Set copyright year to 2014. * gdbreplay.c (gdbreplay_version): Likewise.
2013-12-18gdb/Yufeng Zhang1-0/+5
* aarch64-linux-nat.c (aarch64_linux_set_debug_regs): Set iov.iov_len with the real length in use. gdb/gdbserver/ * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set iov.iov_len with the real length in use.
2013-12-13nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missingJoel Brobecker1-0/+8
This is the gdbserver-equivalent of the change made in GDB to handle the case, in x64 windows version 2012, where the kernel produces a LOAD_DLL_DEBUG_EVENT where the name of the associated DLL cannot be determined at that time, and thus has to be processed later. The visible symptom is that ntdll.dll is missing from the list of shared libraries known to be mapped by the inferior, with other side-effects such as failure to unwind through code provided by that DLL (such as exception handling routines). gdb/gdbserver/ChangeLog: * Makefile.in (safe-ctype.o, lbasename.o): New rules. * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj for all targets that use win32-low.c. * win32-low.c (win32_ensure_ntdll_loaded): New function. (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
2013-12-13Do the target-waiting within do_initial_child_stuff on Windows.Pedro Alves1-0/+15
This is a preparatory patch that achieves two goals: . Makes the initial event handling more similar to GDB's; . Opens the door for implementing post-inititial-handling operations. At the moment, this is only done on Windows, where the post-initial-handling is going to be needed (in the context of Windows 2012). And because we're close to creating the gdb 7.7 branch, making that change for all platforms is a little more risk that we'd like. So the change is currently implemented on Windows. gdb/gdbserver/ChangeLog: * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED if equal to TARGET_WAITKIND_LOADED. * win32-low.c (cached_status): New static global. (win32_wait): Add declaration. (do_initial_child_stuff): Flush all initial pending debug events up to the initial breakpoint. (win32_wait): If CACHED_STATUS was set, return that instead of doing a real wait. Remove the code resuming the execution of the inferior after receiving a TARGET_WAITKIND_LOADED event during the initial phase. Also remove the code changing OURSTATUS->KIND from TARGET_WAITKIND_LOADED to TARGET_WAITKIND_STOPPED.
2013-12-11Fix a bug in matching notifications.Yao Qi1-0/+5
Due to copy-n-paste, the problem caused PR remote/15974 also exists in gdbserver. This patch fixes it in the same way. Patch to fix remote/15974 can be found: https://sourceware.org/ml/gdb-patches/2013-12/msg00014.html gdb/gdbserver: 2013-12-11 Yao Qi <yao@codesourcery.com> * notif.c (handle_notif_ack): Return 0 if no notification matches.
2013-11-20 * linux-low.c (linux_set_resume_request): Fix comment.Doug Evans1-0/+4
2013-11-20 * linux-low.c (resume_status_pending_p): Tweak comment.Doug Evans1-0/+4
2013-11-20Add MPX support to gdbserver.Walfred Tedeschi1-0/+23
2013-05-22 Walfred Tedeschi <walfred.tedeschi@intel.com> gdbserver/ * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c, amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation. * configure.srv (srv_i386_regobj): Add i386-mpx.o. (srv_i386_linux_regobj): Add i386-mpx-linux.o. (srv_amd64_regobj): Add amd64-mpx.o. (srv_amd64_linux_regobj): Add amd64-mpx-linux.o. (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml. (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml. * i387-fp.c (num_pl_bnd_register) Added constant. (num_pl_bnd_cfg_registers) Added constant. (struct i387_xsave) Added reserved area and MPX fields. (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX. * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new function. (tdesc_i386_mpx_linux): Add MPX amd64 target. (init_registers_amd64_mpx_linux): Declare new function. (tdesc_amd64_mpx_linux): Add MPX amd64 target. (x86_64_regmap): Add MPX registers. (x86_linux_read_description): Add MPX case. (initialize_low_arch): Initialize MPX targets. Change-Id: I394d81afa76d11375ce792cefad0ceb9825fb379 Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>
2013-11-18stdlib.h is universal tooTom Tromey1-0/+6
stdlib.h is universal as well, so there is no need to check for it. 2013-11-18 Tom Tromey <tromey@redhat.com> * configure: Rebuild. * configure.ac: Don't check for stdlib.h * defs.h: Include stdlib.h unconditionally. 2013-11-18 Tom Tromey <tromey@redhat.com> * configure: Rebuild. * configure.ac: Don't check for stdlib.h. * gdbreplay.c: Unconditionally include stdlib.h.
2013-11-18remove gdb_dirent.hTom Tromey1-0/+6
This removes gdb_dirent.h and updates the code to use dirent.h instead. It also removes the now-useless configure checks. 2013-11-18 Tom Tromey <tromey@redhat.com> * common/common.m4 (GDB_AC_COMMON): Don't use AC_HEADER_DIRENT. * common/gdb_dirent.h: Remove. * common/filestuff.c: Use dirent.h. * common/linux-osdata.c: Use dirent.h. (NAMELEN): Define. * config.in: Rebuild. * configure: Rebuild. * configure.ac: Don't use AC_HEADER_DIRENT. * linux-fork.c: Use dirent.h * linux-nat.c: Use dirent.h. * nto-procfs.c: Use dirent.h. * procfs.c: Use dirent.h. 2013-11-18 Tom Tromey <tromey@redhat.com> * config.in: Rebuild. * configure: Rebuild. * configure.ac: Don't use AC_HEADER_DIRENT.
2013-11-18don't check for string.h or strings.hTom Tromey1-0/+6
Now that we are using the gnulib string.h module, we don't need to check for string.h or strings.h. This removes the last few checks from the source and from the configure scripts. 2013-11-18 Tom Tromey <tromey@redhat.com> * configure: Rebuild. * common/common.m4 (GDB_AC_COMMON): Don't check for string.h or strings.h. 2013-11-18 Tom Tromey <tromey@redhat.com> * server.h: Don't check HAVE_STRING_H. * gdbreplay.c: Don't check HAVE_STRING_H. * configure: Rebuild.
2013-11-18link gdbreplay against gnulibTom Tromey1-0/+5
Later patches in this series will make changes to gdb and gdbserver configury, necessitating the use of gnulib in gdbreplay. This patch introduces the dependency early, so that subsequent patches don't break the build. 2013-11-18 Tom Tromey <tromey@redhat.com> * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against LIBGNU.
2013-11-08remove unused gdbserver configuryTom Tromey1-0/+5
This updates gdbserver's configure.ac to remove checks that aren't directly needed by gdbserver. 2013-11-08 Tom Tromey <tromey@redhat.com> * configure, config.in: Rebuild. * configure.ac: Remove unused configury.
2013-11-08introduce common.m4Tom Tromey1-0/+6
It has bothered me for a while that files in common/ use macros defined via autoconf checks, but rely on each configure.ac doing the proper checks independently. This patch introduces common/common.m4 which consolidates the checks assumed by code in common. The rule I propose is that if something is needed or used by common, it should be checked for by common.m4. However, if the check is also needed by gdb or gdbserver, then it should be duplicated there. Built and regtested on x86-64 Fedora 18 (though this is hardly the most strenuous case) and using the Fedora 18 mingw cross compilers. I also examined the config.in diffs to ensure that symbols did not go missing. 2013-11-08 Tom Tromey <tromey@redhat.com> * acinclude.m4: Include common.m4. * common/common.m4: New file. * configure, config.in: Rebuild. * configure.ac: Use GDB_AC_COMMON. 2013-11-08 Tom Tromey <tromey@redhat.com> * acinclude.m4: Include common.m4, codeset.m4. * configure, config.in: Rebuild. * configure.ac: Use GDB_AC_COMMON.
2013-11-06S390: Fix TDB regset recognitionAndreas Arnez1-0/+6
When checking for the presence of the TDB regset, the current code interprets ENODATA from PTRACE_GETREGSET as an indication that the TDB regset *could* occur on this system, but the inferior stopped outside a transaction. However, the Linux kernel actually reports ENODATA even on systems without the transactional execution facility. Thus the logic is now changed to check the TE field in the HWCAP as well. This version also checks the existence of the TDB regset -- just to be on the safe side when running on TE-enabled hardware with a kernel that does not offer the TDB regset for some reason. gdb/ * s390-linux-nat.c (s390_read_description): Consider the TE field in the HWCAP for determining 'have_regset_tdb'. gdbserver/ * linux-s390-low.c (HWCAP_S390_TE): New define. (s390_arch_setup): Consider the TE field in the HWCAP for determining 'have_regset_tdb'.
2013-10-16There were two functions who were calling "sizeof" twice.Sergio Durigan Junior1-0/+6
The first one, dw2_get_real_path from gdb/dwarf2read.c, was actually making use of OBSTACK_CALLOC which already calls "sizeof" for its third argument. The second, download_tracepoint_1 from gdb/gdbserver/tracepoint.c, was explicitly calling "sizeof" inside another "sizeof". This patch fixed both functions. gdb/ChangeLog 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com> PR gdb/16014 * dwarf2read.c (dw2_get_real_path): Remove unnecessary call to sizeof. gdb/gdbserver/ChangeLog 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com> PR gdb/16014 * tracepoint.c (download_tracepoint_1): Remove unnecessary double call to sizeof.
2013-10-02[GDBserver]: Silence exits if GDB is connected through stdio.Pedro Alves1-0/+7
If we make gdbserver gdb_continue_to_end actually expect a process exit with GDBserver, we get many testsuite failures with the remote stdio board: -PASS: gdb.arch/amd64-disp-step.exp: continue until exit at amd64-disp-step +FAIL: gdb.arch/amd64-disp-step.exp: continue until exit at amd64-disp-step (the program exited) -PASS: gdb.base/break.exp: continue until exit at recursive next test +FAIL: gdb.base/break.exp: continue until exit at recursive next test (the program exited) -PASS: gdb.base/chng-syms.exp: continue until exit at breakpoint first time through +FAIL: gdb.base/chng-syms.exp: continue until exit at breakpoint first time through (the program exited) ... etc. ... This is what the log shows for all of them: (gdb) continue Continuing. Child exited with status 0 GDBserver exiting [Inferior 1 (process 22721) exited normally] (gdb) FAIL: gdb.arch/amd64-disp-step.exp: continue until exit (the program exited) The problem is the whole "Child exited ... GDBserver exiting" output, that comes out of GDBserver, and that the testsuite is not expecting. I pondered somehow making the testsuite adjust to this. But, testsuite aside, I think GDBserver should not be outputting this at all when GDB is connected through stdio. GDBserver will be printing this in GDB's console, but the user can already tell from the regular output that the inferior is gone. Again, manually: (gdb) tar remote | ./gdbserver/gdbserver - program Remote debugging using | ./gdbserver/gdbserver - program Process program created; pid = 22486 stdin/stdout redirected Remote debugging using stdio done. Loaded symbols for /lib64/ld-linux-x86-64.so.2 0x000000323d001530 in _start () from /lib64/ld-linux-x86-64.so.2 (gdb) c Continuing. Child exited with status 1 ^^^^^^^^^^^^^^^^^^^^^^^^^^ GDBserver exiting ^^^^^^^^^^^^^^^^^ [Inferior 1 (process 22486) exited with code 01] (gdb) Suppressing those two lines makes the output be exactly like when debugging against a remote tcp gdbserver: (gdb) c Continuing. [Inferior 1 (process 22914) exited with code 01] (gdb) 2013-10-02 Pedro Alves <palves@redhat.com> * server.c (process_serial_event): Don't output "GDBserver exiting" if GDB is connected through stdio. * target.c (mywait): Likewise, be silent if GDB is connected through stdio.
2013-10-01[gdbserver/LynxOS]: Incomplete thread list after --attachJoel Brobecker1-0/+6
The current implementation is forgetting to populate the thread list when attaching to the process. This results in an incomplete list of threads when debugging a threaded program. Unfortunately, as the added comments hints, there appears to be no way of getting the list of threads via ptrace, other than by spawning the "ps" command, and parsing its output. Not great, but it appears to be the best we can do. gdb/gdbserver/ChangeLog: * lynx-low.c (lynx_add_threads_after_attach): New function. (lynx_attach): Remove call to add_thread. Add call to lynx_add_threads_after_attach instead.
2013-09-29gdb: btrace: fix build errors on older glibc buildsMike Frysinger1-0/+5
It is possible to have a build of glibc where SYS_perf_event_open is not defined (because when the glibc was compiled, the syscall did not exist), but have newer kernel headers installed so that linux/perf_event.h is available. In this setup, you get a build failure: ./common/linux-btrace.c: In function 'kernel_supports_btrace': ./common/linux-btrace.c:316:23: error: 'SYS_perf_event_open' undeclared (first use in this function) Update the ifdef check to also see if the syscall is available. URL: https://bugs.gentoo.org/473522 Reported-by: William Throwe <wtt6@cornell.edu> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-09-18gdb/gdbserver/Yao Qi1-0/+5
2013-09-18 Yao Qi <yao@codesourcery.com> PR server/15959 * server.c (start_inferior): Clear 'resume_info'. gdb/testsuite/ 2013-09-18 Yao Qi <yao@codesourcery.com> * gdb.server/wrapper.c: New. * gdb.server/wrapper.exp: New.
2013-09-18gdb/gdbserver/Yao Qi1-0/+2
Fix ChangeLog format issue.
2013-09-17 gdbserver/ChangeLogJiong Wang1-0/+4
* linux-tile-low.c (tile_regsets): Modify the size field to 64-bit for each register.
2013-09-172013-09-16 Jiong Wang <jiwang@tilera.com>Jiong Wang1-0/+4
gdbserver/ChangeLog * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add linux-tile-low.o to srv_tgtobj.
2013-09-16gdbserver, aarch64: Zero out regs in aarch64_linux_set_debug_regs.Will Newton1-0/+5
Apply the same fix that was applied to aarch64-linux-nat.c. 2013-09-16 Will Newton <will.newton@linaro.org> * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero out regs.
2013-09-06[gdbserver] Garbage collect unused dependency-tracking Makefile variables.Pedro Alves1-0/+9
These used to be necessary for manual rule dependency tracking. Nothing uses them anymore. (regdat_sh is still needed.) gdb/gdbserver/ 2013-09-06 Pedro Alves <palves@redhat.com> * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h) (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h) (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h) (server_h, gdbthread_h, linux_low_h, linux_ptrace_h) (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h) (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
2013-09-06[gdbserver] Update a couple Makefile rules.Pedro Alves1-0/+5
These two are still written in the pre-auto-dependency-tracking style. They probably were written before that, and committed afterwards without adjustment. An easy oversight to make. gdb/gdbserver/ 2013-09-06 Pedro Alves <palves@redhat.com> * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove explicit header dependencies and use $COMPILE/$POSTCOMPILE.
2013-09-06[gdbserver] Fix IPA build.Pedro Alves1-0/+5
Somehow, my builds yesterdays didn't trip on this... ../src/gdb/gdbserver/linux-amd64-ipa.c: In function ‘initialize_low_tracepoint’: ../src/gdb/gdbserver/linux-amd64-ipa.c:172:3: error: ‘ipa_tdesc’ undeclared (first use in this function) ../src/gdb/gdbserver/linux-amd64-ipa.c:172:3: note: each undeclared identifier is reported only once for each function it appears in gdb/gdbserver/ 2013-09-06 Pedro Alves <palves@redhat.com> * linux-amd64-ipa.c: Include tracepoint.h. * linux-i386-ipa.c: Include tracepoint.h.
2013-09-06Add support for threaded debugging for CRISv32.Ricard Wanderlof1-0/+5
2013-09-06 Ricard Wanderlof <ricardw@axis.com> * cris-tdep.c (cris_gdbarch_init): Add call to get_gdbarch_fetch_tls_load_module_address. gdbserver * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro. (ps_get_thread_area): New function.
2013-09-06Fix compilation for target gdbserver on CRISv32 platform.Ricard Wanderlof1-0/+6
One misspelled function call, and one superfluous typedef. The latter causes an error of the following type when building: linux-crisv32-low.c:372: error: conflicting types for 'elf_gregset_t' /.../target/include/asm/elf.h:36: error: previous declaration of 'elf_gregset_t' was here 2013-09-06 Ricard Wanderlof <ricardw@axis.com> * linux-crisv32-low.c (elf_gregset_t): Delete typedef. (initialize_low_arch): Call init_registers_crisv32 rather than init_register_crisv32.
2013-09-05[gdbserver] Split a new hostio.h file out of server.h.Pedro Alves1-0/+8
gdb/gdbserver/ 2013-09-05 Pedro Alves <palves@redhat.com> * server.h (handle_vFile, hostio_last_error_from_errno): Move to ... * hostio.h: ... this new file. * hostio.c, server.c, linux-low.c, nto-low.c, spu-low, win32-low.c: Include hostio.h.
2013-09-05[gdbserver] Split a new event-loop.h file out of server.h.Pedro Alves1-0/+8
gdb/gdbserver/ 2013-09-05 Pedro Alves <palves@redhat.com> * server.h (gdb_client_data, handler_func, callback_handler_func) (delete_file_handler, add_file_handler, append_callback_event) (delete_callback_event, start_event_loop, initialize_event_loop): Move to event-loop.h and include it. * event-loop.h: New file.
2013-09-05[gdbserver] Split a new dll.h file out of server.h.Pedro Alves1-0/+8
gdb/gdbserver/ 2013-09-05 Pedro Alves <palves@redhat.com> * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h". * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls) (loaded_dll, unloaded_dll): Move to ... * dll.h: ... this new file. * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
2013-09-05[gdbserver] Split a new inferiors.h file out of server.h.Pedro Alves1-0/+13
gdb/gdbserver/ 2013-09-05 Pedro Alves <palves@redhat.com> * server.h (current_process, get_thread_process, all_processes) (add_inferior_to_list, for_each_inferior, current_inferior) (remove_inferior, add_process, remove_process, find_process_pid) (have_started_inferiors_p, have_attached_inferiors_p) (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id) (clear_inferiors, find_inferior, find_inferior_id) (inferior_target_data, set_inferior_target_data) (inferior_regcache_data, set_inferior_regcache_data): Move to inferiors.h, and include it. * inferiors.h: New file.
2013-09-05[gdbserver] Move bytecode compilation bits from server.h to ax.h.Pedro Alves1-0/+6
gdb/gdbserver/ 2013-09-05 Pedro Alves <palves@redhat.com> * server.h (struct emit_ops, current_insn_ptr, emit_error): Move ... * ax.h: ... here.
2013-09-05[gdbserver] Split a new tracepoint.h file out of server.h.Pedro Alves1-0/+24
gdb/gdbserver/ 2013-09-05 Pedro Alves <palves@redhat.com> * ax.c, linux-low.c, linux-x86-low.c, server.c: Include tracepoint.h. * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing) (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing (handle_tracepoint_general_set, handle_tracepoint_query) (tracepoint_finished_step, tracepoint_was_hit) (release_while_stepping_state_list, current_traceframe) (in_readonly_region, traceframe_read_mem) (fetch_traceframe_registers, traceframe_read_sdata) (traceframe_read_info, struct fast_tpoint_collect_status) (fast_tracepoint_collecting, force_unlock_trace_buffer) (handle_tracepoit_bkpts, initialize_low_tracepoint) (supply_fast_tracepoint_registers) (supply_static_tracepoint_registers, set_trampoline_buffer_space) (ipa_tdesc, claim_trampoline_space) (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close) (agent_mem_read, agent_get_trace_state_variable_value) (agent_set_trace_state_variable_value, agent_tsv_read) (agent_mem_read_string, get_raw_reg_func_addr) (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ... * tracepoint.h: ... this new file.
2013-09-05[gdbserver] Split a new utils.h file out of server.h.Pedro Alves1-0/+7
gdb/gdbserver/ 2013-09-05 Pedro Alves <palves@redhat.com> * server.h (perror_with_name, error, fatal, warning, paddress) (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and include it. * utils.h: New file.
2013-09-05[gdbserver] Split a new remote-utils.h file out of server.h.Pedro Alves1-0/+18
gdb/gdbserver/ 2013-09-05 Pedro Alves <palves@redhat.com> * server.h (remote_debug, noack_mode, transport_is_reliable) (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio) (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif) (getpkt, remote_prepare, remote_open, remote_close, write_ok) (write_enn, initialize_async_io, enable_async_io) (disable_async_io, check_remote_input_interrupt_request) (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify) (dead_thread_notify, prepare_resume_reply) (decode_address_to_semicolon, decode_address, decode_m_packet) (decode_M_packet, decode_X_packet, decode_xfer_write) (decode_search_memory_packet, unhexify, hexify) (remote_escape_output, unpack_varlen_hex, clear_symbol_cache) (look_up_one_symbol, relocate_instruction) (monitor_output): Move to remote-utils.h, and include it. * remote-utils.h: New file.
2013-09-05[gdbserver] Delete _ macro (gettext).Pedro Alves1-0/+4
server.h nowadays includes gdb_locale.h, which already brings this in. gdb/gdbserver/ 2013-09-05 Pedro Alves <palves@redhat.com> * server.h (_): Delete.
2013-09-02[gdbserver] Fix trace-buffer-size.exp FAILs.Pedro Alves1-0/+7
I'm seeing trace-buffer-size.exp failing (with gdbserver): (gdb) PASS: gdb.trace/trace-buffer-size.exp: tstatus check 2 show trace-buffer-size 4 Requested size of trace buffer is 4. (gdb) PASS: gdb.trace/trace-buffer-size.exp: show trace buffer size set trace-buffer-size -1 memory clobbered past end of allocated block Remote connection closed (gdb) FAIL: gdb.trace/trace-buffer-size.exp: set trace buffer size 2 set trace-buffer-size unlimited (gdb) PASS: gdb.trace/trace-buffer-size.exp: set trace-buffer-size unlimited That "memory clobbered past end of allocated block" is mcheck triggering. Valgrind shows: ==23624== Invalid write of size 1 ==23624== at 0x418DD8: clear_trace_buffer (tracepoint.c:1443) ==23624== by 0x418F3A: init_trace_buffer (tracepoint.c:1497) ==23624== by 0x41D95B: cmd_bigqtbuffer_size (tracepoint.c:4061) ==23624== by 0x41DEEC: handle_tracepoint_general_set (tracepoint.c:4193) clear_trace_buffer does: static void clear_trace_buffer (void) { trace_buffer_start = trace_buffer_lo; trace_buffer_free = trace_buffer_lo; trace_buffer_end_free = trace_buffer_hi; trace_buffer_wrap = trace_buffer_hi; /* A traceframe with zeroed fields marks the end of trace data. */ ((struct traceframe *) trace_buffer_free)->tpnum = 0; ((struct traceframe *) trace_buffer_free)->data_size = 0; traceframe_read_count = traceframe_write_count = 0; traceframes_created = 0; } And the tpnum+data_size fields are over 4 bytes... This fixes it by ensuring we allocate space at least for an EOB. We have code elsewhere that relies on the EOB being present (like e.g., find_traceframe), so this seems simplest. gdb/gdbserver/ 2013-09-02 Pedro Alves <palves@redhat.com> * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro. (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is allocated. (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
2013-09-02 * win32-low.c (child_xfer_memory): Check if ReadProcessMemoryPierre Muller1-0/+6
or WriteProcessMemory complete successfully and handle ERROR_PARTIAL_COPY error.