From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20750 invoked by alias); 16 Jun 2009 15:53:05 -0000 Received: (qmail 20736 invoked by uid 22791); 16 Jun 2009 15:53:03 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_12,SPF_PASS,WEIRD_PORT X-Spam-Check-By: sourceware.org Received: from imr2.ericy.com (HELO imr2.ericy.com) (198.24.6.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Jun 2009 15:52:56 +0000 Received: from eusrcmw751.eamcs.ericsson.se (eusrcmw751.exu.ericsson.se [138.85.77.51]) by imr2.ericy.com (8.13.1/8.13.1) with ESMTP id n5GFqrvm030065 for ; Tue, 16 Jun 2009 10:52:53 -0500 Received: from ecamlmw720.eamcs.ericsson.se ([142.133.1.72]) by eusrcmw751.eamcs.ericsson.se with Microsoft SMTPSVC(6.0.3790.1830); Tue, 16 Jun 2009 10:52:53 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: GDB segfaults while reading memory 0 with MI Date: Tue, 16 Jun 2009 15:53:00 -0000 Message-ID: <6D19CA8D71C89C43A057926FE0D4ADAA07976B99@ecamlmw720.eamcs.ericsson.se> From: "Marc Khouzam" To: X-IsSubscribed: yes 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: 2009-06/txt/msg00176.txt.bz2 Hi, with HEAD I'm getting a segfault when reading memory from location 0 using MI -data-read-memory 0 x 1 1 320 causes it while x 0=20 works. Session below. I'm running Ubuntu in a virtual machine. Looks like the culprit (although I don't understand anything about it) is target.c::memory_xfer_partial when it calls if (ops->to_has_all_memory (ops)) because the method to_has_all_memory() is void. There were recent changes in this code. Let me know if I should open a bugzilla. Thanks Marc ~"GNU gdb (GDB) 6.8.50.20090612-cvs\n" ~"Copyright (C) 2009 Free Software Foundation, Inc.\n" ~"License GPLv3+: GNU GPL version 3 or later \n" ~"This is free software: you are free to change and redistribute it.\n" ~"There is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\n" ~"and \"show warranty\" for details.\n" ~"This GDB was configured as \"i686-pc-linux-gnu\".\n" ~"For bug reporting instructions, please see:\n" ~"...\n" (gdb)=20 start &"start\n" ~"Temporary breakpoint 1 at 0x80483fd: file b.cc, line 9.\n" ~"Starting program: /home/marc/testing/a.out \n" =3Dthread-group-created,id=3D"20660" =3Dthread-created,id=3D"1",group-id=3D"20660" ^running *running,thread-id=3D"all" (gdb)=20 =3Dlibrary-loaded,id=3D"/lib/ld-linux.so.2",target-name=3D"/lib/ld-linux.so= .2" ,host-name=3D"/lib/ld-linux.so.2",symbols-loaded=3D"0" =3Dlibrary-loaded,id=3D"/usr/lib/libstdc++.so.6",target-name=3D"/usr/lib/li= bst dc++.so.6",host-name=3D"/usr/lib/libstdc++.so.6",symbols-loaded=3D"0" =3Dlibrary-loaded,id=3D"/lib/tls/i686/cmov/libm.so.6",target-name=3D"/lib/t= ls/ i686/cmov/libm.so.6",host-name=3D"/lib/tls/i686/cmov/libm.so.6",symbols-lo aded=3D"0" =3Dlibrary-loaded,id=3D"/lib/libgcc_s.so.1",target-name=3D"/lib/libgcc_s.so= .1" ,host-name=3D"/lib/libgcc_s.so.1",symbols-loaded=3D"0" =3Dlibrary-loaded,id=3D"/lib/tls/i686/cmov/libc.so.6",target-name=3D"/lib/t= ls/ i686/cmov/libc.so.6",host-name=3D"/lib/tls/i686/cmov/libc.so.6",symbols-lo aded=3D"0" ~"\n" ~"Temporary breakpoint 1, main () at b.cc:9\n" ~"9\t int a =3D 0;\n" *stopped,frame=3D{addr=3D"0x080483fd",func=3D"main",args=3D[],file=3D"b.cc"= ,fullna me=3D"/home/marc/testing/b.cc",line=3D"9"},thread-id=3D"1",stopped-threads= =3D"al l" (gdb)=20 x 0 &"x 0\n" ~"0x0:\t" &"Cannot access memory at address 0x0\n" ^error,msg=3D"Cannot access memory at address 0x0" (gdb)=20 -data-read-memory 0 x 1 1 320 Segmentation fault