From: Tom Tromey <tromey@redhat.com>
To: Reid Kleckner <rnk@mit.edu>
Cc: gdb-patches@sourceware.org, unladen-swallow@googlegroups.com
Subject: Re: [RFA] Add interface for registering JITed code
Date: Thu, 30 Jul 2009 16:30:00 -0000 [thread overview]
Message-ID: <m3vdlaryq5.fsf@fleche.redhat.com> (raw)
In-Reply-To: <9a9942200907241639o4e4b1d4ema22bac7bb6db9e35@mail.gmail.com> (Reid Kleckner's message of "Fri\, 24 Jul 2009 16\:39\:19 -0700")
>>>>> "Reid" == Reid Kleckner <rnk@mit.edu> writes:
Tom> Yeah. This would work if you had two JITs in a process, say loaded
Tom> dynamically, and the various __jit symbols had hidden visibility.
Reid> I think if someone has that use case, then they can write a client
Reid> side library that wraps the __jit symbols and make the two JITs call
Reid> that.
Yeah, I changed my mind, let's not worry about it. If it ever comes up,
we can deal with it then without breaking compatibility.
Reid> + /* Remember a mapping from entry_addr to objfile. */
Reid> + set_objfile_data (objfile, jit_objfile_data, (void*) entry_addr);
Tom> I don't think you need the cast here. There are a few of these.
Reid> Actually, it is, because entry_addr is a CORE_ADDR. CORE_ADDR fits
Reid> into a void* right? I'm just doing it to avoid mallocing a single
Reid> CORE_ADDR.
Oh, I see. It is better to just do the allocation; I think we try to
avoid casting between CORE_ADDR and void*.
Reid> + case BPSTAT_WHAT_CHECK_JIT:
Reid> + if (debug_infrun)
Reid> + fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_CHECK_JIT\n");
Reid> +
Reid> + /* Switch terminal for any messages produced by breakpoint_re_set. */
Reid> + target_terminal_ours_for_output ();
Is the comment here really valid?
I think it should probably mention jit_event_handler, not
breakpoint_re_set.
Reid> +//#include "assert.h"
Reid> +//#include "string.h"
Just delete these.
(And just FYI, gdb doesn't allow "//" comments.)
Reid> +/* Openning the file is a no-op. */
Typo, should be "opening".
Reid> + /* If we already found the symbols and successfully set the breakpoint, don't
Reid> + do it again. */
Reid> + if (jit_descriptor_addr != 0)
Reid> + return;
I'm sorry I didn't notice this before.
This approach won't work if you have address space randomization enabled
and you re-run the inferior.
Tom
next prev parent reply other threads:[~2009-07-30 15:13 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 1:58 Reid Kleckner
2009-07-23 12:08 ` Reid Kleckner
2009-07-23 23:21 ` Tom Tromey
2009-07-24 13:25 ` Ulrich Weigand
2009-07-24 16:52 ` Doug Evans
2009-07-25 0:40 ` [unladen-swallow] " Reid Kleckner
2009-07-24 16:55 ` Reid Kleckner
2009-07-24 20:42 ` Eli Zaretskii
2009-07-24 20:55 ` Tom Tromey
2009-07-25 15:29 ` Eli Zaretskii
2009-07-27 23:20 ` Reid Kleckner
2009-07-28 20:20 ` Eli Zaretskii
2009-07-28 22:23 ` Reid Kleckner
2009-07-29 15:20 ` Eli Zaretskii
2009-07-24 21:06 ` Tom Tromey
2009-07-25 0:23 ` Reid Kleckner
2009-07-30 16:30 ` Tom Tromey [this message]
2009-07-30 16:54 ` Tom Tromey
2009-08-05 21:05 ` [unladen-swallow] " Reid Kleckner
2009-07-30 21:10 ` Thiago Jung Bauermann
2009-07-31 18:18 ` Thiago Jung Bauermann
2009-07-31 20:31 ` [unladen-swallow] " Reid Kleckner
2009-08-01 14:43 ` Thiago Jung Bauermann
2009-08-14 19:29 ` Tom Tromey
2009-08-14 23:37 ` Reid Kleckner
2009-08-17 15:31 ` Tom Tromey
2009-08-20 18:22 ` Doug Evans
2009-08-21 15:17 ` Ken Werner
2009-08-21 16:31 ` Doug Evans
2009-08-21 18:59 ` Ken Werner
2009-08-21 19:53 ` Doug Evans
2009-07-31 20:55 ` Paul Pluzhnikov
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=m3vdlaryq5.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=rnk@mit.edu \
--cc=unladen-swallow@googlegroups.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