Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Sarnath K - CTD, Chennai." <k_sarnath@ctd.hcltech.com>
To: Eli Zaretskii <eliz@is.elta.co.il>, k_sarnath@ctd.hcltech.com
Cc: gdb@sources.redhat.com
Subject: RE: "xbreak" command in GDB ?
Date: Fri, 25 Jan 2002 00:24:00 -0000	[thread overview]
Message-ID: <EF836A380096D511AD9000B0D021B52754B46D@narmada.ctd.hcltech.com> (raw)

Hi,

The following is the session demonstrating
failure of "xbreak" on GDB Version 5.1 (for i386), running
on Linux kernel 2.4.0/Pentium III. GDB was configured
for "i686-pc-linux-gnu".

Source:

[root@boost /tmp]# cat xbreak.c
int main()
{
        a();
}

int a()
{
        int i=0, j=0;

        return 0;
}

Compilation:

[root@boost /tmp]# cc -g -o xbreak xbreak.c

Debug session:

[root@boost /tmp]# ./gdb ./xbreak
GNU gdb 5.1
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) xbreak a
Breakpoint 1 at 0x80483c6
(gdb) run
Starting program: /tmp/./xbreak

Program exited normally.
(gdb) disassemble a
Dump of assembler code for function a:
0x80483ac <a>:  push   %ebp
0x80483ad <a+1>:        mov    %esp,%ebp
0x80483af <a+3>:        sub    $0x8,%esp
0x80483b2 <a+6>:        movl   $0x0,0xfffffffc(%ebp)
0x80483b9 <a+13>:       movl   $0x0,0xfffffff8(%ebp)
0x80483c0 <a+20>:       xor    %eax,%eax
0x80483c2 <a+22>:       jmp    0x80483c4 <a+24>
0x80483c4 <a+24>:       leave
0x80483c5 <a+25>:       ret
End of assembler dump.

Conclusion:
 The "xbreak" command says that it has set the bkpt at
0x80483c6. But the disassembly says that the last instruction
(ret) is at location 0x80483c5. Is this a bug ?

Thanks,
Sarnath


             reply	other threads:[~2002-01-25  8:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-25  0:24 Sarnath K - CTD, Chennai. [this message]
     [not found] <EF836A380096D511AD9000B0D021B52754B482@narmada.ctd.hcltech .com>
2002-01-25  1:20 ` Pierre Muller
2002-01-28 11:18   ` Elena Zannoni
  -- strict thread matches above, loose matches on Subject: below --
2002-01-25  0:33 Sarnath K - CTD, Chennai.
2002-01-24  1:33 Sarnath K - CTD, Chennai.
2002-01-24 23:46 ` Eli Zaretskii
2002-01-25  0:27   ` Pierre Muller
2002-01-31 12:45     ` Michael Snyder
2002-01-31 12:39   ` Michael Snyder
2002-01-31 12:43 ` 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=EF836A380096D511AD9000B0D021B52754B46D@narmada.ctd.hcltech.com \
    --to=k_sarnath@ctd.hcltech.com \
    --cc=eliz@is.elta.co.il \
    --cc=gdb@sources.redhat.com \
    /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