Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Lokesh Kumar" <lokeshk@gmail.com>
To: gdb@sourceware.org
Subject: Debugging new code using debug-info from old code
Date: Thu, 08 May 2008 00:29:00 -0000	[thread overview]
Message-ID: <baf3502a0805071729u6777239cl4e2ed083ab618dd4@mail.gmail.com> (raw)

Hi all,

I am trying to debug a "transformed" C code using the debugging
information of the "original" C code. Essentially, my code goes
through some transformations that keeps its semantic structure same
but add some extraneous function calls distributed throughout the
code.

I want that when a user debugs this new code, all the new additions
are hidden away from him/her and (s)he feels as if (s)he is debugging
the original code. What this means is that there should exists an
underlying mapping between the transformed code and original code so
that it could map the debugging commands for original code into
corresponding commands for transformed code.

I started out by trying to load the symbol table of the original
executable while debugging the transformed binary but that doesn't
seem to help since the function addresses and everything else has
changed. My second thoughts seem to suggest that if I can update the
debugging information in the transformed binary as per my original
code, I may get what I want. However, I am not sure how this will work
if there were some compile-time optimizations in one code and not in
another but I am not thinking about that now.

I think I can use some help here. Does anyone here have a better idea
on how to do it ? Or perhaps, how can I update the debugging
information from one binary to another ?

Thanks in advance,

-Lokesh

-- 
"It is not God that is worshipped but the group or authority that
claims to speak in His name. Sin becomes disobedience to authority not
violation of integrity."

Lokesh Kumar


             reply	other threads:[~2008-05-08  0:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08  0:29 Lokesh Kumar [this message]
2008-05-08 18:44 ` Michael Snyder

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=baf3502a0805071729u6777239cl4e2ed083ab618dd4@mail.gmail.com \
    --to=lokeshk@gmail.com \
    --cc=gdb@sourceware.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