This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/14227] New: gdb hangs after entering mixed "n" and "bt"command


http://sourceware.org/bugzilla/show_bug.cgi?id=14227

             Bug #: 14227
           Summary: gdb hangs after entering mixed "n" and "bt" command
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: asmwarrior@gmail.com
    Classification: Unclassified


I just found that using the gdb CVS mingw build 2012-06-13, gdb will hang at
some time when I enter some command. Here is the log message:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

E:\code\cb\test_code\gdbpython-demo\bin>gdb a.exe
GNU gdb (GDB) 7.4.50.20120613-cvs
Copyright (C) 2012 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 "mingw32".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from E:\code\cb\test_code\gdbpython-demo\bin\a.exe...done.
(gdb) b main()
Breakpoint 1 at 0x4016f3: file main.cpp, line 14.
(gdb) n
The program is not being run.
(gdb) n
The program is not being run.
(gdb) r
Starting program: E:\code\cb\test_code\gdbpython-demo\bin\a.exe
[New Thread 5556.0x1284]

Breakpoint 1, main () at main.cpp:14
14          std::map<int, std::string> m;
(gdb) e
Ambiguous command "e": echo, edit, en, enable, end, eval, exec-file, explore.
(gdb) e
Ambiguous command "e": echo, edit, en, enable, end, eval, exec-file, explore.
(gdb) n
15          m[0] = "000";
(gdb) n
16          m[1] = "111";
(gdb) bt
#0  main () at main.cpp:16
(gdb) n
18          std::list<std::string> l = {"a", "b", "c"};
(gdb) bt
#0  main () at main.cpp:18
(gdb) n
19          std::vector<std::string> v = {"a", "b", "c"};
(gdb) bt
#0  main () at main.cpp:19
(gdb) n
20          std::queue<std::string> q;
(gdb) b


Note, that when I try to enter the "bt" command in the last line, gdb just
hangs, and I can do nothing.

GDB CVS 2012-06-09 version does not have such issue.

My test code was:

#include <map>
#include <list>
#include <stack>
#include <vector>
#include <queue>
#include <string>



int main()
{

    std::map<int, std::string> m;
    m[0] = "000";
    m[1] = "111";

    std::list<std::string> l = {"a", "b", "c"};
    std::vector<std::string> v = {"a", "b", "c"};
    std::queue<std::string> q;
    q.push("a");
    q.push("b");

    std::stack<std::string> s;
    s.push("a");
    s.push("b");

    return 0;
}


The build log was:
[ 50.0%] g++.exe -Wall -g -pipe -mthreads -fexceptions -std=gnu++0x
-D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE      -c main.cpp -o
obj\main.o
[100.0%] g++.exe  -o bin\a.exe obj\main.o    
Output size is 603.11 KB

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]