unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Dan Čermák" <dan.cermak@cgc-instruments.com>
To: help-gnu-emacs@gnu.org
Subject: Re: GDB - create buffer to show information about CPU registers
Date: Thu, 26 Jan 2017 12:42:40 +0100	[thread overview]
Message-ID: <87d1faqc7j.fsf@cgc-instruments.com> (raw)
In-Reply-To: <jwv1svrzpw1.fsf-monnier+gmane.emacs.help@gnu.org>


Thanks for the tip, I think that is everything that I need to get
started!

This solution even has the advantage that I can share it with other
users who don't use Emacs but are still using gdb.

Considering a 'less portable' extension: do you happen to know what
would be the easiest way to create a buffer where the evaluation of
these gdb macros would be shown? So basically to have a gui?


Dan

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> My currently biggest issue with my setup is, that to get some
>> information from a register, I have to print its content with gdb (from
>> inside Emacs), put that into the mate-calculator to find which bits are
>> set and which are not and finally open up the datasheet of the CPU and
>> look up the meaning of each bit.
>
> I don't have a ready-made solution for you, but note that GDB
> is scriptable.  If you look at Emacs's src/.gdbinit file
> (http://git.savannah.gnu.org/cgit/emacs.git/tree/src/.gdbinit)
> you can see what we do to help ourselves debug Emacs's C code.
>
> Note how you can use C-like operations in it, so you could code up some
> .gdbinit file for yourself where you write some handy commands that
> print the state of your devices's registers in a meaningful manner.
>
> Note that this is a "GDB-only" solution (the only Emacs part of it is
> that you got the info in an Emacs discussion group, and that the sample
> file provided came from Emacs's source code).
>
>
>         Stefan



  parent reply	other threads:[~2017-01-26 11:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  0:48 GDB - create buffer to show information about CPU registers Dan Čermák
2017-01-25  5:16 ` Stefan Monnier
2017-01-25 12:09   ` Skip Montanaro
2017-01-26 11:42   ` Dan Čermák [this message]
2017-01-26 14:55     ` Augusto Fraga Giachero
2017-01-27  0:58     ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d1faqc7j.fsf@cgc-instruments.com \
    --to=dan.cermak@cgc-instruments.com \
    --cc=help-gnu-emacs@gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).