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: record btrace experience [Re: x86_64-m32 internal error for multi-thread-step.exp [Re: [PATCH v10 06/28] btrace: change branch trace data structure]]


> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Sunday, January 25, 2015 8:13 PM

Thanks a lot for the feedback.

> BTW these defaults sometimes did limit my use of btrace but right now I do
> not
> have a reproducer where it works with setting them unlimited while it does
> not
> while leaving them as they are:
> 	(gdb) show record instruction-history-size
> 	Number of instructions to print in "record instruction-history" is 10.
> 	(gdb) show record function-call-history-size
> 	Number of functions to print in "record function-call-history" is 10.

Regarding instruction-history-size and function-call-history-size,
they only affect the number of lines displayed in the "record
instruction-history" and "record function-call-history" commands.  They
should have no impact on recording or on the backtrace command.

I think what you are looking for is a command to set the buffer size.
See https://sourceware.org/ml/gdb-patches/2014-11/msg00462.html.


> The problem I see is how to transparently enable btrace on some host.
> 
> Instead of
> 	-ex r
> one has to type
> 	-ex start -ex 'set record instruction-history-size unlimited' -ex 'set
> record function-call-history-size unlimited' -ex 'record btrace' -ex c
> which is really not convenient.  
[...]
> Obviously it would be nice to be able to do just:
> 	echo 'record btrace' >>~/.gdbinit

Agreed.

I guess you know the record architecture better than I do.  The record
command pushes a new record target onto the target stack. This requires
a running inferior.

We could try to instead install a hook to delay pushing the record target
until we have an inferior.  The hook will remain installed when the inferior
terminates or is rerun; "record stop" will remove the hook.

Regards,
Markus.

Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052


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