bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDB steps over function


From: Jan Engelhardt
Subject: GDB steps over function
Date: Wed, 6 Apr 2011 19:20:49 +0200 (CEST)
User-agent: Alpine 2.01 (LNX 1266 2009-07-14)

Using below's example, gdb's single stepping steps over the call to f.


Reading symbols from /dev/shm/d...done.
(gdb) b main
Breakpoint 1 at 0x40055a: file d.c, line 17.
(gdb) r
Starting program: /dev/shm/d 
Missing separate debuginfo for /lib64/ld-linux-x86-64.so.2
Try: zypper install -C 
"debuginfo(build-id)=b1d398a5cb1609e7ac1c51a26588e87fc20f753c"
Missing separate debuginfo for /lib64/libc.so.6
Try: zypper install -C 
"debuginfo(build-id)=1493bf69b1d671cbad9be1d1b0284fbd9138444b"

Breakpoint 1, main () at d.c:17
17              f(0);
(gdb) s
Foo

Program exited normally.
(gdb) 
---

gdb --version:
GNU gdb (GDB) SUSE (7.2-3.3)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show 
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.


Testcase:
---
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

static void f(bool c)
{
        do {
                if (c)
                        continue;
                printf("Foo\n");
                return;
        } while (true);
}

int main(void)
{
        f(0);
        return EXIT_SUCCESS;
}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]