I am working on a patch that makes a valgrind process "fully debuggable"
(so, you can put breaks, look variables or registers, continue, next,
 step, query leaks interactively, etc ...).

So, to obtain the below, you could just start your executable
under the "patched" valgrind, put breaks at the places
where you want to look at valgrind simulated registers,
and then either manually (or as part of "break command") do:
   info reg
   continue

The patch is attached to bugzilla 214909.
It is however something like 2 months old now. I am currently working
on it (some cleanup, use GPLv2+ code rather than GPL3, fixing some bugs,
...).

If you are interested, I can provide the last version.

(NB: patch is currently only done for linux + x86 or amd64).

Philippe


>-----Original Message-----
>From: Alex Slover [mailto:[email protected]] 
>Sent: Thursday 29 July 2010 16:35
>To: [email protected]
>Subject: [Valgrind-users] Accessing contents of registers
>
>I'm looking to create a self-contained function or macro that will
>allow me to read the values of some or all of valgrind's simulated
>registers at any point during the program's execution. It doesn't
>really matter how- putting them in a data structure, just dumping them
>haphazardly onto the stack, or even outputting them to stdout or the
>log file are all acceptable to varying degrees.  It's clear that
>(assuming it's even possible), I need to use libvex to accomplish
>this, but even after spending some time reading the libvex source I'm
>still pretty fuzzy about it all; the source is fine for details but
>I'm a little lost w/o the "big picture", I'm still not totally clear
>what libvex even is and what it's for. Would someone mind helping out
>a newb with a few questions? Namely,
>
>- Does "big picture" documentation for libvex even exist, or is the
>source about all I'm going to get?
>- Is what I'm thinking about even possible, or is libvex only allowed
>when developing valgrind tools?
>- Can I just call LibVEX_GuestAMD64_initialize() at any point during
>execution (the platform is always amd64-linux), then get the register
>values from the now-initialized VexGuestAMD64State object, or do I
>need to run some IR code?
>- If I do need IR code, how does that work?
>
> I appreciate it.
>
>Alex
>
>---------------------------------------------------------------
>---------------
>The Palm PDK Hot Apps Program offers developers who use the
>Plug-In Development Kit to bring their C/C++ apps to Palm for a share
>of $1 Million in cash or HP Products. Visit us here for more details:
>http://p.sf.net/sfu/dev2dev-palm
>_______________________________________________
>Valgrind-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/valgrind-users
>

____
 
This message and any files transmitted with it are legally privileged and 
intended for the sole use of the individual(s) or entity to whom they are 
addressed. If you are not the intended recipient, please notify the sender by 
reply and delete the message and any attachments from your system. Any 
unauthorised use or disclosure of the content of this message is strictly 
prohibited and may be unlawful.
 
Nothing in this e-mail message amounts to a contractual or legal commitment on 
the part of EUROCONTROL, unless it is confirmed by appropriately signed hard 
copy.
 
Any views expressed in this message are those of the sender.

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to