From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13113 invoked by alias); 8 Aug 2007 15:25:47 -0000 Received: (qmail 12966 invoked by uid 22791); 8 Aug 2007 15:25:45 -0000 X-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO X-Spam-Check-By: sourceware.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (83.160.170.119) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Aug 2007 15:25:39 +0000 Received: from dijkstra.wildebeest.org ([192.168.1.29]) by gnu.wildebeest.org with esmtp (Exim 4.43) id 1IInSM-0006sf-Hl for frysk@sources.redhat.com; Wed, 08 Aug 2007 17:28:22 +0200 Subject: Re: frysk meeting 2007-08-09 9:30 US east From: Mark Wielaard To: frysk In-Reply-To: <46B9C3C7.5090002@redhat.com> References: <46B9C3C7.5090002@redhat.com> Content-Type: multipart/mixed; boundary="=-Q0HkL6InCD3iHZACzjot" Date: Wed, 08 Aug 2007 15:25:00 -0000 Message-Id: <1186586732.29962.25.camel@dijkstra.wildebeest.org> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) X-Spam-Score: -4.4 (----) X-Virus-Checked: Checked by ClamAV on sourceware.org X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00280.txt.bz2 --=-Q0HkL6InCD3iHZACzjot Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 3870 Hi, Small transcript saved: On Wed, 2007-08-08 at 09:23 -0400, Andrew Cagney wrote: > - frysk-asm.h walk through We wnet over the folliwing files: $ less frysk-core/frysk/pkglibdir/funit-frameless.S $ less frysk-imports/include/funit-util.h $ less frysk-imports/include/frysk-asm.h $ less frysk-imports/include/frysk-asm.h $ less frysk-core/frysk/pkglibdir/funit-symbols.S The frysk-asm.h files has lots and lots of comments. $ info gas Will give you documentation on the .cif assembler directives used. * Pseudo Ops:: Assembler Directives * CFI directives:: `.cfi_startproc', `.cfi_endproc', etc. http://sourceware.org/binutils/docs-2.17/as/CFI-directives.html (I must have missed this before, because I was looking for it, but only found the gas 2.9 manual online previously, which doesn't seem to support the cfi directives.) > - C++ types Stan was smart and had a premade demo, which is attached. > - more debuginfo $ ./frysk-core/frysk/bindir/fhpd $$ Attached to process 5784 (fhpd) de debuginfo defset delete detach (fhpd) debuginfo /lib/libnss_files-2.6.so /usr/lib/debug/lib/libnss_files-2.6.so.debug /lib/ld-2.6.so /usr/lib/debug/lib/ld-2.6.so.debug /lib/libc-2.6.so /usr/lib/debug/lib/libc-2.6.so.debug /lib/libdl-2.6.so /usr/lib/debug/lib/libdl-2.6.so.debug /lib/libtinfo.so.5.6 /usr/lib/debug/lib/libtinfo.so.5.6.debug /bin/bash /usr/lib/debug/bin/bash.debug (fhpd) quit Quitting... $ ./frysk/bindir/fdebuginfo $$ /lib/libnss_files-2.6.so /usr/lib/debug/lib/libnss_files-2.6.so.debug /lib/ld-2.6.so /usr/lib/debug/lib/ld-2.6.so.debug /lib/libc-2.6.so /usr/lib/debug/lib/libc-2.6.so.debug /lib/libdl-2.6.so /usr/lib/debug/lib/libdl-2.6.so.debug /lib/libtinfo.so.5.6 /usr/lib/debug/lib/libtinfo.so.5.6.debug /bin/bash /usr/lib/debug/bin/bash.debug $ ./frysk/bindir/fcore $$ $ ./frysk/bindir/fdebuginfo core.$$ Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind ex out of range: 0 at java.lang.String.charAt(libgcj.so.8rh) at frysk.util.DebuginfoPaths.getDebuginfo(fdebuginfo) at frysk.bindir.fdebuginfo.printDebuginfo(fdebuginfo) at frysk.bindir.fdebuginfo.access$0(fdebuginfo) at frysk.bindir.fdebuginfo$1.parseCores(fdebuginfo) at frysk.util.CommandlineParser.doParse(fdebuginfo) at frysk.util.CommandlineParser.parse(fdebuginfo) at frysk.bindir.fdebuginfo.main(fdebuginfo) [... bah! That is no good. After some debugging we came up with ...] $ cvs diff frysk-core/frysk/util Index: frysk-core/frysk/util/DebuginfoPaths.java =================================================================== RCS file: /cvs/frysk/frysk-core/frysk/util/DebuginfoPaths.java,v retrieving revision 1.1 diff -u -r1.1 DebuginfoPaths.java --- frysk-core/frysk/util/DebuginfoPaths.java 7 Aug 2007 15:26:24 -0000 1.1 +++ frysk-core/frysk/util/DebuginfoPaths.java 8 Aug 2007 14:49:32 -0000 @@ -77,7 +77,7 @@ String name = mod.getName(); // Check for valid executables - if (name.charAt(0)=='/') + if (name.length() != 0 && name.charAt(0)=='/') { // Ignore non-binary modules if (mod.getElf()==null) $ ./frysk/bindir/fdebuginfo core.$$ /lib/ld-linux.so.2 /usr/lib/debug/lib/ld-2.6.so.debug /lib/libc.so.6 /usr/lib/debug/lib/libc-2.6.so.debug /lib/libdl.so.2 /usr/lib/debug/lib/libdl-2.6.so.debug /lib/libtinfo.so.5 /usr/lib/debug/lib/libtinfo.so.5.6.debug /bin/bash /usr/lib/debug/bin/bash.debug [... But this is slightly strange, needs investigation, why is the name empty in the first place? Phil and Mark think it might be the vdso module name ...] $ uname -a Linux hermans.wildebeest.org 2.6.22.1-41.fc7 #1 SMP Fri Jul 27 18:10:34 EDT 2007 i686 i686 i386 GNU/Linux $ grep vdso /proc/$$/maps 00110000-00111000 r-xp 00110000 00:00 0 [vdso] --=-Q0HkL6InCD3iHZACzjot Content-Disposition: attachment; filename=session Content-Type: text/x-csrc; name=session; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 3101 #include using namespace std; class Base1 { public: Base1 (const char *m):msg (m) { std::cout << "Base1::Base1(" << msg << ")" << std::endl; } ~Base1 () { std::cout << "Base1::~Base1(" << msg << ")" << std::endl; } const char *msg; }; class Base2 { public: Base2 (const char *m):msg (m) { std::cout << "Base2::Base2(" << msg << ")" << std::endl; } ~Base2 () { std::cout << "Base2::~Base2(" << msg << ")" << std::endl; } const char *msg; }; class Type : public Base1, public Base2 { public: Type(const char *m, const char *n, const char *o) : Base1(m), Base2(n), note(o) { std::cout << "Type::Type(" << note << ")" << std::endl; } ~Type() { std::cout << "Type::~Type(" << note << ")" << std::endl; } private: const char *note; }; class Base3 { public: virtual char do_this (char) =0; virtual short do_this (short) =0; virtual int do_this (int) =0; virtual float do_this (float) =0; }; class Derived : public Base3 { public: virtual char do_this(char x) { return do_this_impl(x); } virtual short do_this(short x) { return do_this_impl(x); } virtual int do_this(int x) { return do_this_impl(x); } virtual float do_this(float x) { return do_this_impl(x); } private: template TYPE do_this_impl(TYPE t) { std::cout << t << std::endl; return t; } }; Type mb("static", "main", "mb"); void func () { std::cout << "main" << std::endl; Type new_base = Type ("new base", "main", "new_base"); Derived xyz; xyz.do_this ((char)'1'); xyz.do_this ((short)2); xyz.do_this ((int)3); xyz.do_this ((float) 4.1); while(1); } int main (int argc, char **argv) { func(); } (fhpd) list 74* void 75 func () 76 { 77 std::cout << "main" << std::endl; 78 Type new_base = Type ("new base", "main", "new_base"); 79 Derived xyz; 80 xyz.do_this ((char)'1'); 81 xyz.do_this ((short)2); 82 xyz.do_this ((int)3); 83 xyz.do_this ((float) 4.1); 84 while(1); 85 } 86 87 88 int 89 main (int argc, char **argv) 90 { 91 func(); 92 } (fhpd) what xyz Derived at /home/scox/accu/src/tstctors0.cc#79 (fhpd) what Derived public Base3 { void Derived (); void Derived (); char do_this (char ); short int do_this (short int ); int do_this (int ); float do_this (float ); private: char do_this_impl (char ); short int do_this_impl (short int ); int do_this_impl (int ); float do_this_impl (float ); } at /home/scox/accu/src/tstctors0.cc#57 (fhpd) print Derived Error: Symbol "Derived" is not found in the current context. (fhpd) print xyz {Base3={_vptr.Base3=0x401290, }, } (fhpd) what mb extern Type at (fhpd) what Type public Base1, public Base2 { private: byte * note; void Type (byte * ,byte * ,byte * ); void ~Type (); } at /home/scox/accu/src/tstctors0.cc#33 (fhpd) print mb {Base1={msg=0x401240 "static", }, Base2={msg=0x40123b "main", }, note=0x401238 "mb", } (fhpd) quit Quitting... --=-Q0HkL6InCD3iHZACzjot--