aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/notif.c
AgeCommit message (Collapse)AuthorFilesLines
2020-02-07Move gdbserver to top levelTom Tromey1-154/+0
This patch moves gdbserver to the top level. This patch is as close to a pure move as possible -- gdbserver still builds its own variant of gnulib and gdbsupport. Changing this will be done in a separate patch. [v2] Note that, per Simon's review comment, this patch changes the tree so that gdbserver is not built for or1k or score. This makes sense, because there is apparently not actually a gdbserver port here. [v3] This version of the patch also splits out some configury into a new file, gdbserver/configure.host, so that the top-level configure script can simply rely on it in order to decide whether gdbserver should be built. [v4] This version adds documentation and removes some unnecessary top-level dependencies. [v5] Update docs to mention "make all-gdbserver" and change how top-level configure decides whether to build gdbserver, switching to a single, shared script. Tested by the buildbot. ChangeLog 2020-02-07 Tom Tromey <tom@tromey.com> Pedro Alves <palves@redhat.com> * src-release.sh (GDB_SUPPORT_DIRS): Add gdbserver. * gdbserver: New directory, moved from gdb/gdbserver. * configure.ac (host_tools): Add gdbserver. Only build gdbserver on certain systems. * Makefile.in, configure: Rebuild. * Makefile.def (host_modules, dependencies): Add gdbserver. * MAINTAINERS: Add gdbserver. gdb/ChangeLog 2020-02-07 Tom Tromey <tom@tromey.com> * README: Update gdbserver documentation. * gdbserver: Move to top level. * configure.tgt (build_gdbserver): Remove. * configure.ac: Remove --enable-gdbserver. * configure: Rebuild. * Makefile.in (distclean): Don't mention gdbserver. Change-Id: I826b7565b54604711dc7a11edea0499cd51ff39e
2020-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files.
2019-04-19Use std::list for event notifications in gdbserverTom Tromey1-27/+10
This changes gdbserver to use std::list rather than common/queue.h for event notifications. gdb/gdbserver/ChangeLog 2019-04-19 Tom Tromey <tom@tromey.com> * server.c (struct vstop_notif): Derive from notif_event. <base>: Remove. (queue_stop_reply): Update. (remove_all_on_match_ptid): Change type. Rewrite. (discard_queued_stop_replies): Rewrite. (in_queued_stop_replies_ptid): Change type. (in_queued_stop_replies): Rewrite. (notif_stop): Update. (queue_stop_reply_callback): Update. (captured_main): Don't call initialize_notif. (push_stop_notification): Update. * notif.c (notif_write_event, handle_notif_ack) (notif_event_enque, notif_push): Update. (notif_event_xfree, initialize_notif): Remove. * notif.h (struct notif_event): Include <list>, not "common/queue.h". (struct notif_server) <queue>: Now a std::list. (notif_event_p): Remove typedef. (initialize_notif): Don't declare. (struct notif_event): Add virtual destructor.
2019-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
2018-01-02Update copyright year range in all GDB filesJoel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files
2017-01-01update copyright year range in GDB filesJoel Brobecker1-1/+1
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-11-23gdbserver: Use debug_printf for debug outputPedro Alves1-4/+4
gdb/gdbserver/ChangeLog: 2016-11-23 Pedro Alves <palves@redhat.com> * linux-low.c (check_zombie_leaders): Use debug_printf for debug output. * notif.c (handle_notif_ack, notif_event_enque): Likewise. * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use debug_printf and debug_flush for debug output. * server.c (handle_general_set): Likewise. * thread-db.c (try_thread_db_load): Use debug_printf for debug output.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-03-06New common function "startswith"Gary Benson1-1/+1
This commit introduces a new inline common function "startswith" which takes two string arguments and returns nonzero if the first string starts with the second. It also updates the 295 places where this logic was written out longhand to use the new function. gdb/ChangeLog: * common/common-utils.h (startswith): New inline function. All places where this logic was used updated to use the above.
2015-01-01Update year range in copyright notice of all files owned by the GDB project.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2014-07-30Make all source files include defs.h or server.h firstGary Benson1-0/+1
This commit makes all source files under gdb/ that include headers from gdb/ include either defs.h or server.h before any other code. This ensures that definitions and macros from the two config.h files are always in place for our code. An exception has been made for gdb/gdbserver/gdbreplay.c which seems to be a special case. gdb/ 2014-07-30 Gary Benson <gbenson@redhat.com> * btrace.c: Include defs.h. * common/ptid.c: Include defs.h or server.h as appropriate. * nat/mips-linux-watch.c: Likewise. gdb/gdbserver/ 2014-07-30 Gary Benson <gbenson@redhat.com> * hostio-errno.c: Move server.h to top of includes list. * inferiors.c: Likewise. * linux-x86-low.c: Likewise. * notif.c: Include server.h.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker1-1/+1
2013-12-11Fix a bug in matching notifications.Yao Qi1-6/+9
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-01-01Update years in copyright notice for the GDB files.Joel Brobecker1-2/+1
Two modifications: 1. The addition of 2013 to the copyright year range for every file; 2. The use of a single year range, instead of potentially multiple year ranges, as approved by the FSF.
2012-12-15gdb/gdbserver/Yao Qi1-0/+168
2012-12-15 Yao Qi <yao@codesourcery.com> * Makefile.in (OBS): Add notif.o. * notif.c, notif.h: New. * server.c: Include "notif.h". (struct vstop_notif) <next>: Remove. <base>: New field. (queue_stop_reply): Update. (push_event, send_next_stop_reply): Remove. (discard_queued_stop_replies): Update. (notif_stop): New variable. (handle_v_stopped): Remove. (handle_v_requests): Don't call handle_v_stopped. Call handle_ack_notif instead. (queue_stop_reply_callback): Call notif_event_enque instead of queue_stop_reply. (handle_status): Don't call send_next_stop_reply, call notif_write_event instead. (kill_inferior_callback): Likewise. (detach_or_kill_inferior_callback): Likewise. (main): Call initialize_notif. (process_serial_event): Call QUEUE_is_empty. (handle_target_event): Call notif_push instead of push event. * server.h (push_event): Remove declaration.