Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Nai-Hsien" <dennis@loop.com.tw>
To: <gdb@sourceware.org>
Subject: Debugging a shared library through gdbserver
Date: Wed, 15 Mar 2006 03:44:00 -0000	[thread overview]
Message-ID: <063201c647e2$b2c39160$0102000a@loop.com.tw> (raw)

I am debugging a shared library made by myself through gdbserver. After
searching the mail list,
I think the gdb can be used to debug a shared library. However, when I debug
my shared library by
following steps, I got error to step through the source code
(user_str_to_id()) in my shared library.
Could anybody instruct me to do it?

Thank you very much
Dennis

# load my executable file
(gdb) add-symbol-file console
add symbol table from file "console" at
# load my shared library
(gdb) add-symbol-file lib/libmylib.so.1.0.1
add symbol table from file "lib/libmylib.so.1.0.1" at
(gdb) b clih_login
Breakpoint 1 at 0x10016238: file sysui.c, line 289.
(gdb) c

Breakpoint 1, clih_login (handle=268700768, argc=2, argv=0x10041840) at
sysui.c:289
(gdb) next
# set a breakpoint in my shared library
(gdb) b user_str_to_id
Breakpoint 2 at 0xb05c: file utility.c, line 418.
# then I got trouble here!!!
(gdb) step
Warning:
Cannot insert breakpoint 2.
Error accessing memory address 0xb05c: Input/output error.

(gdb)


             reply	other threads:[~2006-03-15  3:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-15  3:44 Nai-Hsien [this message]
2006-03-15  4:16 ` Daniel Jacobowitz
2006-03-15 12:25   ` Nai-Hsien
2006-03-15 16:17     ` Daniel Jacobowitz
2006-03-16  2:11       ` Nai-Hsien
2006-03-16  3:00         ` Daniel Jacobowitz

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='063201c647e2$b2c39160$0102000a@loop.com.tw' \
    --to=dennis@loop.com.tw \
    --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