From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23445 invoked by alias); 30 Oct 2011 13:51:30 -0000 Received: (qmail 23436 invoked by uid 22791); 30 Oct 2011 13:51:28 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MISSING_HEADERS,RCVD_IN_DNSWL_LOW,TW_DB,TW_NX,TW_SM X-Spam-Check-By: sourceware.org Received: from mail-iy0-f169.google.com (HELO mail-iy0-f169.google.com) (209.85.210.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 30 Oct 2011 13:51:15 +0000 Received: by iagf6 with SMTP id f6so8088878iag.0 for ; Sun, 30 Oct 2011 06:51:14 -0700 (PDT) Received: by 10.231.50.143 with SMTP id z15mr4016150ibf.91.1319982674527; Sun, 30 Oct 2011 06:51:14 -0700 (PDT) Received: from [192.168.1.102] ([115.195.157.152]) by mx.google.com with ESMTPS id jm11sm21943158ibb.1.2011.10.30.06.51.00 (version=SSLv3 cipher=OTHER); Sun, 30 Oct 2011 06:51:13 -0700 (PDT) Message-ID: <4EAD56D4.5020709@gmail.com> Date: Sun, 30 Oct 2011 18:17:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 CC: gdb@sourceware.org, Xun Xun Subject: Re: gdb crash when I try to print a std::queue (Windows) References: <4EAD4FE7.9050102@gmail.com> In-Reply-To: <4EAD4FE7.9050102@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00229.txt.bz2 On 2011-10-30 21:23, asmwarrior wrote: > Is it possible just add a condition check like: > > if(type_name==0) > return NULL; > > I just test this code change by adding the above condition check, and this time, gdb does not crash, but no good information is show, it looks like: (gdb) r Starting program: e:\code\test_gdb\a1.exe [New Thread 268.0x1098] Program received signal SIGTRAP, Trace/breakpoint trap. main () at e:\code\cb\test_code\gdbpython-demo\main.cpp:41 41 return 0; (gdb) p q $1 = { c = {, std::al locator >, std::allocator, std::allocator > > >> = { _M_impl = {, std::allocator > >> = {<__gnu_cxx::new_allocator, std::allocator > >> = {}, }, _M_map = 0xb89e98, _M_map_size = 8, _M_start = "a", _M_finish = }}, }} (gdb) python print 1 1 (gdb) p v $2 = {, std::al locator >, std::allocator, std::allocator > > >> = { _M_impl = {, s td::allocator > >> = {<__gnu_cxx::new_allocator, std::allocator > >> = {}, }, _M_start = 0xb89e70, _M_finish = 0xb89e7c, _M_end_of_storage = 0xb89e7c}}, } (gdb) p a No symbol "a" in current context. (gdb) p stdStr $3 = "std::string value Ref" (gdb) You can see, both the queue and the vector does not shown quite well. but std::string can still work well. > -------------------------------------------------------------------- > BTW: if I build my test code under mingw gcc 4.6.2, then there's no crash here, and "p q" can correctly show the std::queue's contents from pretty printer. > > BTW2: my friend xunxun can test the code under Win7, and it seems there's no crash. My friend xunxun is a gdb20111027 cvs version, and it has no crash under Win7. I just use this gdb20111027 cvs on my WinXP, and it works quite well. So, the conclusion should be: This bug is introduced after 20111027, so it is nearly the last week. I hope the developers can find the regression introduced the last week. I'm not familiar with the gdb's source code, but I would like to test for you. Thanks. asmwarrior ollydbg from codeblocks' forum