From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4928 invoked by alias); 20 Oct 2010 05:19:56 -0000 Received: (qmail 4906 invoked by uid 22791); 20 Oct 2010 05:19:53 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-px0-f169.google.com (HELO mail-px0-f169.google.com) (209.85.212.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Oct 2010 05:19:47 +0000 Received: by pxi6 with SMTP id 6so1122670pxi.0 for ; Tue, 19 Oct 2010 22:19:46 -0700 (PDT) Received: by 10.142.216.2 with SMTP id o2mr5483663wfg.142.1287551986266; Tue, 19 Oct 2010 22:19:46 -0700 (PDT) Received: from [172.16.152.159] ([60.12.143.22]) by mx.google.com with ESMTPS id w22sm10932407wfd.7.2010.10.19.22.19.43 (version=SSLv3 cipher=RC4-MD5); Tue, 19 Oct 2010 22:19:45 -0700 (PDT) Message-ID: <4CBE7B08.9060905@gmail.com> Date: Wed, 20 Oct 2010 05:19:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.6.0 MIME-Version: 1.0 To: "gdb@sourceware.org" , gdb-patches@sourceware.org Subject: Re: gdb with python support still get crash on showing uninitialized local variables References: <4CB66700.3000907@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00312.txt.bz2 On 2010-10-20 4:17, Tom Tromey wrote: > reading variable s (Cannot access memory at address 0x80) > Tom> I am working on a fix for this. > > Tom> Currently all gdb exceptions are convert to a Python RuntimeError. But, > Tom> I think we should differentiate a little more. In particular, I think a > Tom> gdb MEMORY_ERROR should be a separate class, and should be handled > Tom> specially by the pretty-printing code (basically by omitting the stack > Tom> trace). > > This patch implements this idea. It adds some new subclasses of > RuntimeError, including one specifically for MEMORY_ERROR. Then it > arranges for the memory error exception to be treated specially by the > pretty-printing code. > > Built and regtested on x86-64 (compile farm). > Some new test cases are included. > > asmwarrior, it would be helpful if you could try this out. > > Ok? > > Tom > OK. I just use git to check out the latest whole gdb source (>100M) Then apply your patch Then use MSYS + MINGW GCC 4.4.4 to build it . But I failed with the build error. like: ../../gdb/libiberty/fibheap.c:151: warning: incompatible implicit declaration of built-in function 'free' ../../gdb/libiberty/fibheap.c:156: warning: incompatible implicit declaration of built-in function 'free' ../../gdb/libiberty/fibheap.c:172: warning: incompatible implicit declaration of built-in function 'free' ../../gdb/libiberty/fibheap.c: In function 'fibheap_extract_min': ../../gdb/libiberty/fibheap.c:190: warning: incompatible implicit declaration of built-in function 'free' ../../gdb/libiberty/fibheap.c: In function 'fibheap_replace_key_data': ../../gdb/libiberty/fibheap.c:220: error: 'LONG_MIN' undeclared (first use in th is function) ../../gdb/libiberty/fibheap.c:220: error: (Each undeclared identifier is reporte d only once ../../gdb/libiberty/fibheap.c:220: error: for each function it appears in.) ../../gdb/libiberty/fibheap.c: In function 'fibheap_delete_node': ../../gdb/libiberty/fibheap.c:261: error: 'LONG_MIN' undeclared (first use in th is function) ../../gdb/libiberty/fibheap.c:265: warning: implicit declaration of function 'ab ort' ../../gdb/libiberty/fibheap.c:265: warning: incompatible implicit declaration of built-in function 'abort' ../../gdb/libiberty/fibheap.c: In function 'fibheap_delete': ../../gdb/libiberty/fibheap.c:277: warning: incompatible implicit declaration of built-in function 'free' ../../gdb/libiberty/fibheap.c: In function 'fibheap_consolidate': ../../gdb/libiberty/fibheap.c:368: warning: implicit declaration of function 'me mset' ../../gdb/libiberty/fibheap.c:368: warning: incompatible implicit declaration of built-in function 'memset' make[2]: *** [fibheap.o] Error 1 make[2]: Leaving directory `e:/test/build/libiberty' make[1]: *** [all-libiberty] Error 2 make[1]: Leaving directory `e:/test/build' make: *** [all] Error 2 When I manually add this macro definition then continue the build, I got other more errors. I can remember that the snapshot of GDB source 20101005, I can build it successful. I'm not sure why. Asmwarrior. BTW: My friend Loaden has some build errors when building gdb.exe (weekly 20101019) from linux, here is his build log: /bin/install -c -m 644 ../../../../src/gdb/bfd/doc/bfd.info '/home/loaden/gdb/share/info' install-info --info-dir='/home/loaden/gdb/share/info' '/home/loaden/gdb/share/info/bfd.info' make[4]: Leaving directory `/home/loaden/AUR/gdb/build/gdb-win/bfd/doc' Making install in po make[4]: Entering directory `/home/loaden/AUR/gdb/build/gdb-win/bfd/po' if test -r ../../../../src/gdb/bfd/../mkinstalldirs; then \ ../../../../src/gdb/bfd/../mkinstalldirs /home/loaden/gdb/share; \ else \ ../../../../src/gdb/bfd/mkinstalldirs /home/loaden/gdb/share; \ fi /bin/sh: line 1: ../../../../src/gdb/bfd/../mkinstalldirs: Permission denied make[4]: *** [install-data-yes] Error 126 make[4]: Leaving directory `/home/loaden/AUR/gdb/build/gdb-win/bfd/po' make[4]: Entering directory `/home/loaden/AUR/gdb/build/gdb-win/bfd' make[5]: Entering directory `/home/loaden/AUR/gdb/build/gdb-win/bfd' make[5]: Nothing to be done for `install-exec-am'. test -z "/home/loaden/gdb/include" || /bin/mkdir -p "/home/loaden/gdb/include" /bin/install -c -m 644 bfd.h ../../../src/gdb/bfd/../include/ansidecl.h ../../../src/gdb/bfd/../include/symcat.h ../../../src/gdb/bfd/../include/bfdlink.h '/home/loaden/gdb/include' test -z "/home/loaden/gdb/lib" || /bin/mkdir -p "/home/loaden/gdb/lib" /bin/sh ./libtool --mode=install /bin/install -c libbfd.la '/home/loaden/gdb/lib' libtool: install: /bin/install -c .libs/libbfd.lai /home/loaden/gdb/lib/libbfd.la libtool: install: /bin/install -c .libs/libbfd.a /home/loaden/gdb/lib/libbfd.a libtool: install: chmod 644 /home/loaden/gdb/lib/libbfd.a libtool: install: i686-mingw32-ranlib /home/loaden/gdb/lib/libbfd.a libtool: install: warning: remember to run `libtool --finish /home/loaden/AUR/gdb/depends/lib' make[5]: Leaving directory `/home/loaden/AUR/gdb/build/gdb-win/bfd' make[4]: Leaving directory `/home/loaden/AUR/gdb/build/gdb-win/bfd' make[3]: *** [install-recursive] Error 1 make[3]: Leaving directory `/home/loaden/AUR/gdb/build/gdb-win/bfd' make[2]: *** [install] Error 2 make[2]: Leaving directory `/home/loaden/AUR/gdb/build/gdb-win/bfd' make[1]: *** [install-bfd] Error 2 make[1]: Leaving directory `/home/loaden/AUR/gdb/build/gdb-win' make: *** [install] Error 2