* frysk meeting 2007-08-09 9:30 US east
@ 2007-08-08 13:23 Andrew Cagney
2007-08-08 15:25 ` Mark Wielaard
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2007-08-08 13:23 UTC (permalink / raw)
To: frysk
[yes running late; please contact me for dail in info]
This week:
- frysk-asm.h walk through
- C++ types
- more debuginfo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: frysk meeting 2007-08-09 9:30 US east
2007-08-08 13:23 frysk meeting 2007-08-09 9:30 US east Andrew Cagney
@ 2007-08-08 15:25 ` Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2007-08-08 15:25 UTC (permalink / raw)
To: frysk
[-- Attachment #1: Type: text/plain, Size: 3870 bytes --]
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]
[-- Attachment #2: session --]
[-- Type: text/x-csrc, Size: 3101 bytes --]
#include <iostream>
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<class TYPE> 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> (char );
short int do_this_impl<short int> (short int );
int do_this_impl<int> (int );
float do_this_impl<float> (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 <unknown>
(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...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-08 15:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-08 13:23 frysk meeting 2007-08-09 9:30 US east Andrew Cagney
2007-08-08 15:25 ` Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).