From: Serge Pavlovsky <pal@interexc.com>
To: Sisyphus <sisyphus@altlinux.ru>
Subject: Re: [sisyphus] Re: GDB/debug info problems
Date: 16 Jun 2003 22:33:13 +0300
Message-ID: <1055791993.29295.16.camel@localhost.localdomain> (raw)
In-Reply-To: <20030616175241.GB15666@mhz.mikhail.zabaluev.name>
В Пнд, 16.06.2003, в 20:52, Mikhail Zabaluev пишет:
> Hello Serge,
>
> On Mon, Jun 16, 2003 at 07:40:42PM +0300, Serge Pavlovsky wrote:
> >
> > давно надо. у нашего gdb есть еще трабл - посмотреть содержимое string
> > невозможно при использовании формата по умолчанию. я не помню, это stabs
> > или dwarf-2, но надо указать другой и тогда все ок.
>
> Это std::string? Так у него содержимое может быть вполне нетривиально :)
оно как раз тривиальное и я же написал что по другому его видно.
[22:30:51 pal@localhost ~/tmp]$ cat a.cpp
#include <string>
int main ( ) {
std :: string s = "123";
return 0;
}
[22:30:57 pal@localhost ~/tmp]$ g++ -g3 a.cpp -o a
[22:31:05 pal@localhost ~/tmp]$ gdb -q a
(gdb) b 4
Breakpoint 1 at 0x80485b8: file a.cpp, line 4.
(gdb) r
Starting program: /home/pal/tmp/a
Breakpoint 1, main () at a.cpp:4
4 return 0;
(gdb) p s
$1 = {static npos = Cannot access memory at address 0x82b5588
(gdb) The program is running. Exit anyway? (y or n) y
[22:31:20 pal@localhost ~/tmp]$ g++ -g3 -gstabs+ a.cpp -o a
[22:31:26 pal@localhost ~/tmp]$ gdb -q a
(gdb) b 4
Breakpoint 1 at 0x80485b8: file a.cpp, line 4.
(gdb) r
Starting program: /home/pal/tmp/a
Breakpoint 1, main () at a.cpp:4
4 return 0;
(gdb) p s
$1 = {static npos = 4294967295, _M_dataplus = {<allocator<char>> = {<No
data fields>}, _M_p = 0x804987c "123"},
static _S_empty_rep_storage = {0, 0, 0, 0}}
(gdb) The program is running. Exit anyway? (y or n) y
--
Serge Pavlovsky <pal@interexc.com>
next prev parent reply other threads:[~2003-06-16 19:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-14 11:55 [sisyphus] " Mikhail Zabaluev
2003-06-16 16:40 ` Serge Pavlovsky
2003-06-16 17:52 ` [sisyphus] " Mikhail Zabaluev
2003-06-16 19:33 ` Serge Pavlovsky [this message]
2003-06-17 10:24 ` Serge Pavlovsky
2003-06-17 10:34 ` Mikhail Zabaluev
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=1055791993.29295.16.camel@localhost.localdomain \
--to=pal@interexc.com \
--cc=sisyphus@altlinux.ru \
/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
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git