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 python/13535] New: pretty printers unusable from MI due toearly crash


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

             Bug #: 13535
           Summary: pretty printers unusable from MI due to early crash
           Product: gdb
           Version: archer
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
        AssignedTo: unassigned@sourceware.org
        ReportedBy: dodji@seketeli.org
    Classification: Unclassified


A simple mi debugging session crashes when it starts when I
-enable-pretty-printing on, and doesn't crash without.  E.g:

$ cat -n ~/test.cc
     1    #include <vector>
     2    #include <string>
     3    
     4    int
     5    main()
     6    {
     7        std::string s1 = "kÃlÃ", s2 = "fila", s3 = "saba";
     8        std::vector<std::string> v;
     9        v.push_back(s1);
    10        v.push_back(s2);
    11        v.push_back(s3);
    12    }
$ 

I compiled with g++ version 4.6.1 20110908 (Red Hat 4.6.1-9), with debug
info, and -O0.

And then I do:

$ gdb --interpreter=mi2 ~/test
=thread-group-added,id="i1"
~"GNU gdb (GDB) Fedora (7.3.1-46.fc15)\n"
...
~"done.\n"
(gdb) 
-enable-pretty-printing
^done
(gdb) 
-break-insert -f -i 0 main
^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x0000000000400a3d",func="main()",file="test.cc",fullname="/home/dodji/test.cc",line="7",times="0",original-location="main"}
(gdb)
-exec-run
=thread-group-started,id="i1",pid="4248"
=thread-created,id="1",group-id="i1"
^running
*running,thread-id="all"
(gdb)
...
-var-create --thread 1 --frame 0 -  * s1
Erreur de segmentation (core dumped)
$

There is no segmentation fault when I don't turn call
-enable-pretty-printing.


I guess I could have filled this under the MI component as well as
python (for pretty printers).  Please fill free to adjust the
component if I messed up.

Thanks.

-- 
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]