Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v3 21/29] Share handle_exception
Date: Wed, 15 Apr 2020 11:27:35 -0400	[thread overview]
Message-ID: <33cddd77-b9c5-dfaa-78cb-2812016b07fd@simark.ca> (raw)
In-Reply-To: <20200313190855.28662-22-tromey@adacore.com>

On 2020-03-13 3:08 p.m., Tom Tromey wrote:
> Both gdb and gdbserver have a "handle_exception" function, the bulk of
> which is shared between the two implementations.  This patch arranges
> for the entire thing to be moved into nat/windows-nat.c, with the
> differences handled by callbacks.  This patch introduces one more
> callback to make this possible.
> 
> gdb/ChangeLog
> 2020-03-13  Tom Tromey  <tromey@adacore.com>
> 
> 	* windows-nat.c (MS_VC_EXCEPTION): Move to nat/windows-nat.c.
> 	(handle_exception_result): Move to nat/windows-nat.h.
> 	(DEBUG_EXCEPTION_SIMPLE): Remove.
> 	(windows_nat::handle_ms_vc_exception): New function.
> 	(handle_exception): Move to nat/windows-nat.c.
> 	(get_windows_debug_event): Update.
> 	(STATUS_WX86_BREAKPOINT, STATUS_WX86_SINGLE_STEP): Move to
> 	nat/windows-nat.c.
> 	* nat/windows-nat.h (handle_ms_vc_exception): Declare.
> 	(handle_exception_result): Move from windows-nat.c.
> 	(handle_exception): Declare.
> 	* nat/windows-nat.c (MS_VC_EXCEPTION, handle_exception)
> 	(STATUS_WX86_SINGLE_STEP, STATUS_WX86_BREAKPOINT): Move from
> 	windows-nat.c.
This patch introduced some GDB-specific calls in nat/windows-nat.c.  That
file is built by gdbserver, so it breaks that build.  This is when building
on Cygwin:

  CXX    nat/windows-nat.o
/home/smarchi/src/binutils-gdb/gdbserver/../gdb/nat/windows-nat.c: In function ‘windows_nat::handle_exception_result windows_nat::handle_exception(target_waitstatus*, bool)’:
/home/smarchi/src/binutils-gdb/gdbserver/../gdb/nat/windows-nat.c:200:8: error: ‘cygwin_exceptions’ was not declared in this scope
  200 |  if ((!cygwin_exceptions && (addr >= cygwin_load_start
      |        ^~~~~~~~~~~~~~~~~
/home/smarchi/src/binutils-gdb/gdbserver/../gdb/nat/windows-nat.c:200:38: error: ‘cygwin_load_start’ was not declared in this scope
  200 |  if ((!cygwin_exceptions && (addr >= cygwin_load_start
      |                                      ^~~~~~~~~~~~~~~~~
/home/smarchi/src/binutils-gdb/gdbserver/../gdb/nat/windows-nat.c:201:19: error: ‘cygwin_load_end’ was not declared in this scope
  201 |         && addr < cygwin_load_end))
      |                   ^~~~~~~~~~~~~~~
/home/smarchi/src/binutils-gdb/gdbserver/../gdb/nat/windows-nat.c:202:10: error: ‘find_pc_partial_function’ was not declared in this scope
  202 |      || (find_pc_partial_function (addr, &fn, NULL, NULL)
      |          ^~~~~~~~~~~~~~~~~~~~~~~~

Simon


  reply	other threads:[~2020-04-15 15:27 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 19:08 [PATCH v3 00/29] Windows code sharing + bug fix Tom Tromey
2020-03-13 19:08 ` [PATCH v3 01/29] Remove the "next" field from windows_thread_info Tom Tromey
2020-03-13 19:08 ` [PATCH v3 02/29] Rename win32_thread_info to windows_thread_info Tom Tromey
2020-03-13 19:08 ` [PATCH v3 03/29] Rename windows_thread_info::id to "tid" Tom Tromey
2020-03-13 19:08 ` [PATCH v3 04/29] Share windows_thread_info between gdb and gdbserver Tom Tromey
2020-03-13 19:08 ` [PATCH v3 05/29] Use new and delete for windows_thread_info Tom Tromey
2020-03-13 19:08 ` [PATCH v3 06/29] Change two windows_thread_info members to "bool" Tom Tromey
2020-03-13 19:08 ` [PATCH v3 07/29] Make windows_thread_info::name a unique_xmalloc_ptr Tom Tromey
2020-03-13 19:08 ` [PATCH v3 08/29] Use lwp, not tid, for Windows thread id Tom Tromey
2020-03-13 19:08 ` [PATCH v3 09/29] Share Windows thread-suspend and -resume code Tom Tromey
2020-03-13 19:08 ` [PATCH v3 10/29] Change type of argument to windows-nat.c:thread_rec Tom Tromey
2020-03-13 19:08 ` [PATCH v3 11/29] Handle pending stops from the Windows kernel Tom Tromey
2020-03-13 19:08 ` [PATCH v3 12/29] Call CloseHandle from ~windows_thread_info Tom Tromey
2020-03-13 19:08 ` [PATCH v3 13/29] Wrap shared windows-nat code in windows_nat namespace Tom Tromey
2020-03-13 19:08 ` [PATCH v3 14/29] Share thread_rec between gdb and gdbserver Tom Tromey
2020-03-13 19:08 ` [PATCH v3 15/29] Share get_image_name " Tom Tromey
2020-03-13 19:08 ` [PATCH v3 16/29] Share some Windows-related globals Tom Tromey
2020-03-13 19:08 ` [PATCH v3 17/29] Normalize handle_output_debug_string API Tom Tromey
2020-03-13 19:08 ` [PATCH v3 18/29] Fix up complaints.h for namespace use Tom Tromey
2020-03-13 19:08 ` [PATCH v3 19/29] Share handle_load_dll and handle_unload_dll declarations Tom Tromey
2020-03-13 19:08 ` [PATCH v3 20/29] Remove some globals from windows-nat.c Tom Tromey
2020-03-13 19:08 ` [PATCH v3 21/29] Share handle_exception Tom Tromey
2020-04-15 15:27   ` Simon Marchi [this message]
2020-04-15 16:54     ` Tom Tromey
2020-04-15 17:54       ` Simon Marchi
2020-04-15 19:13         ` Tom Tromey
2020-04-16  0:52           ` Simon Marchi
2020-03-13 19:08 ` [PATCH v3 22/29] Share some inferior-related Windows code Tom Tromey
2020-03-13 19:08 ` [PATCH v3 23/29] Introduce fetch_pending_stop Tom Tromey
2020-03-13 19:08 ` [PATCH v3 24/29] Move wait_for_debug_event to nat/windows-nat.c Tom Tromey
2020-03-13 19:08 ` [PATCH v3 25/29] Make last_wait_event static Tom Tromey
2020-03-13 19:08 ` [PATCH v3 26/29] Add read_pc / write_pc support to win32-low Tom Tromey
2020-03-13 19:08 ` [PATCH v3 27/29] Introduce win32_target_ops::decr_pc_after_break Tom Tromey
2020-03-13 19:08 ` [PATCH v3 28/29] Implement stopped_by_sw_breakpoint for Windows gdbserver Tom Tromey
2020-03-13 19:08 ` [PATCH v3 29/29] Add pending stop support to gdbserver's Windows port Tom Tromey
2020-04-16  1:11   ` [pushed] gdbserver: fix format string warning in win32-low.cc (was: Re: [PATCH v3 29/29] Add pending stop support to gdbserver's Windows port) Simon Marchi
2020-04-08 20:33 ` [PATCH v3 00/29] Windows code sharing + bug fix Tom Tromey
2020-04-08 22:17   ` Hannes Domani
2020-04-09  2:49     ` Tom Tromey
2020-04-09 14:57       ` Jon Turney
2020-04-09 15:08         ` Hannes Domani
2020-04-09 17:54         ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=33cddd77-b9c5-dfaa-78cb-2812016b07fd@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox