From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
Subject: Re: [RFA/Windows] Change type of handler field of current_seh in windows-tdep.c
Date: Mon, 19 Apr 2010 18:15:00 -0000 [thread overview]
Message-ID: <201004191915.14556.pedro@codesourcery.com> (raw)
In-Reply-To: <000c01cadf9b$dad07560$90716020$@muller@ics-cnrs.unistra.fr>
On Monday 19 April 2010 09:39:41, Pierre Muller wrote:
> (top-gdb) p *$_tlb.current_seh
> $1 = {next_seh = 0x15dffe0, handler = 0x61018970}
> (top-gdb) p *$_tlb.current_seh.next_seh
> $2 = {next_seh = 0xffffffff, handler = 0x7c839ad8}
> (top-gdb)
>
>
> After this patch, the handler field also displays the
> function corresponding to that pointer.
>
>
> (top-gdb) p *$_tlb.current_seh
> $2 = {next_seh = 0x15dffe0,
> handler = 0x61018970 <_cygtls::handle_exceptions(_EXCEPTION_RECORD*,
> _exceptio
> n_list*, _CONTEXT*, void*)>}
> (top-gdb) p *$_tlb.current_seh .next_seh
> $3 = {next_seh = 0xffffffff, handler = 0x7c839ad8 <ValidateLocale+688>}
>
> This make it much more readable, no?
Yeah. Why not just use builtin_func_ptr though?
> + struct type *seh_handler_type, *seh_handler_ptr_type;
>
> dword_ptr_type = arch_integer_type (gdbarch, gdbarch_ptr_bit (gdbarch),
> 1, "DWORD_PTR");
> @@ -125,6 +126,13 @@ windows_get_tlb_type (struct gdbarch *gd
>
> /* Structured Exception Handler */
>
> + seh_handler_type = arch_type (gdbarch, TYPE_CODE_FUNC, 0, NULL);
> + TYPE_TARGET_TYPE (seh_handler_type) = builtin_type
> (gdbarch)->builtin_void;
> +
> + seh_handler_ptr_type = arch_type (gdbarch, TYPE_CODE_PTR,
> + TYPE_LENGTH (void_ptr_type), NULL);
> + TYPE_TARGET_TYPE (seh_handler_ptr_type) = seh_handler_type;
> +
--
Pedro Alves
next prev parent reply other threads:[~2010-04-19 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-19 8:39 Pierre Muller
2010-04-19 18:15 ` Pedro Alves [this message]
2010-04-19 23:14 ` [RFA/Windows-v2] " Pierre Muller
2010-04-19 23:36 ` Pedro Alves
2010-04-19 23:55 ` Pierre Muller
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=201004191915.14556.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/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