This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Add "debug jit" for easier tracing of JIT support internals


On Wed, Jan 5, 2011 at 2:51 PM, Pedro Alves <pedro@codesourcery.com> wrote:

> On Wednesday 05 January 2011 21:53:11, Paul Pluzhnikov wrote:
>> One question: is '%zu' appropriate format for printing size_t ?
>
> Nope, %z is C99. ?GDB is currently written in C90.
>
> AFAICS, the size_t you're talking about holds the size of an
> object on the target,

Right. It's actually specified as uint64_t in jit.h, not size_t ...

> while 'size_t' is about sizes of objects
> on the host. ?E.g., on a 32-bit GDB (cross) debugging a 64-bit
> inferior, size_t will usually be a 32-bit type. ?I think it'd be
> better to make that a ULONGEST throughout (and then use phex
> or pulongest)

Since this interface is frozen, and ULONGEST isn't available to clients,
I'll just cast symfile_size to ULONGEST and print it with pulongest.


On Wed, Jan 5, 2011 at 2:57 PM, Pedro Alves <pedro@codesourcery.com> wrote:

> Until and if we find a better way, an implemented show callback
> should be a requirement for all new commands.

Restored to the original ...

Thanks,

-- 
Paul Pluzhnikov


ChangeLog:

2010-01-05  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* jit.c (jit_debug): New variable.
	(show_jit_debug): New function.
	(jit_register_code, jit_inferior_init): Add debug output.
	(_initialize_jit): Register "debug jit" command.


doc/ChangeLog:

2010-01-05  Paul Pluzhnikov  <ppluzhnikov@google.com>

	* gdb.texi (Debugging Output): Document "set debug jit"

Attachment: gdb-jit-debug-20110105-3.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]