]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Introduce windows_nat::event_code_to_string
authorPedro Alves <pedro@palves.net>
Fri, 11 Apr 2025 21:36:10 +0000 (22:36 +0100)
committerPedro Alves <pedro@palves.net>
Thu, 30 Apr 2026 17:37:32 +0000 (18:37 +0100)
commitedeff39baffb07b68e8790980dbee20965123621
tree374bb7391a817c7e56c67e7b51171285abe0bced
parent87e43d6cf10e35f13c9c23a009125e1abc970e1a
Introduce windows_nat::event_code_to_string

Instead of:

   switch (event_code)
     {
     case FOO_DEBUG_EVENT:
      DEBUG_EVENTS (..., "FOO_DEBUG_EVENT");
      ...
     case BAR_DEBUG_EVENT:
      DEBUG_EVENTS (..., "BAR_DEBUG_EVENT");
      ...

... with one DEBUG_EVENTS call per event type, log the event just once
before the switch, and introduce a new event_code_to_string function
to handle the event code to string conversion.

Do the same on GDB's and gdbserver's Windows backends.

Approved-By: Tom Tromey <tom@tromey.com>
Change-Id: Id38b7e30df182e4742f3179538de3c643cf42668
commit-id:a8abf6a6
gdb/nat/windows-nat.c
gdb/nat/windows-nat.h
gdb/windows-nat.c
gdbserver/win32-low.cc