From: "RCX" <lrogers42@yahoo.com>
Subject: Instrumentation error #2
Date: 7 Apr 2005 12:19:45 -0700 [thread overview]
Message-ID: <1112901585.472694.279380@o13g2000cwo.googlegroups.com> (raw)
A different issue when trying to use Atom tools against the same
executable in my previous message, this time I am receiving a SEGV
error.
Again, I have modified the "ptrace" example program. This time I
simply added the following line within the loop that iterates through
the procedures in each object:
[snip top of program]
for (p = GetFirstObjProc(obj); p != NULL; p = GetNextProc(p)) {
if (GetProcInfo(p, ProcSymRes) != SYMRES_EXTERN) // **ADDED**
{
AddCallProc(p,ProcBefore,"ProcTrace",SafeProcName(p));
}
}
[snip bottom of program]
The additional "if" statement should limit the instrumentation to
everything except external procedures.
When processed against my large executable application, I get the
following debug (ladebug) output:
/usr/users/rcx/bin$ atom prog1 ptrace.inst.c ptrace.anal.c -L../lib
-ladebug
Welcome to the Ladebug Debugger Version 67 (built Apr 18 2002 for
Compaq Tru64 UNIX)
------------------
object file name: /tmp/atomAAAamlsFa/prog1.tool
Reading symbolic information ...done
[#1: stop in int Instrument(int, char**, Obj*) ]
atom: Warning: Shared library '/h/oracle/ora817/lib/libwtc8.so' is
stripped, ignored.
[1] stopped at [int Instrument(int, char**, Obj*):36 0x12002e690]
36 AddCallProto("ProcTrace(char *)");
(ladebug) stop signal SEGV
[#2: stop signal SEGV ]
(ladebug) cont
Thread received signal SEGV
Thread received signal SEGV
[2] stopped at [<opaque> elfhash(...) 0x1200c0a20]
Information: An <opaque> type was presented during execution of the
previous command. For complete type information on this symbol,
recompilation of the program will be necessary. Consult the compiler
man pages for details on producing full symbol table information using
the '-g' (and '-gall' for cxx) flags.
(ladebug) dump.
>0 0x1200c0a20 in elfhash(...) in /tmp/atomAAAamlsFa/prog1.tool
#1 0x1200c19e0 in obj_resolve_symname(...) in
/tmp/atomAAAamlsFa/prog1.tool
#2 0x120065c48 in UnknownProcedure1023FromFile9(...) in
/tmp/atomAAAamlsFa/prog1.tool
#3 0x120065b70 in __ATOMI_objctprog_resolve_procname(...) in
/tmp/atomAAAamlsFa/prog1.tool
#4 0x1200594e0 in __ATOMI_objctlist_resolve_procname(...) in
/tmp/atomAAAamlsFa/prog1.tool
#5 0x120059abc in __ATOMI_objctlist_resolve_symbol(...) in
/tmp/atomAAAamlsFa/prog1.tool
#6 0x1200a8028 in GetProcInfo(...) in /tmp/atomAAAamlsFa/prog1.tool
#7 0x12002e6d4 in Instrument(argc=1, argv=0x140028180,
obj=0x140028640) "ptrace.inst.c":38
argc=1
argv=0x140028180
obj=0x140028640
p=0x147d1ecd0
#8 0x1200aa6e8 in InstrumentAll(...) in /tmp/atomAAAamlsFa/prog1.tool
#9 0x12004cfd4 in UnknownProcedure686FromFile9(...) in
/tmp/atomAAAamlsFa/prog1.tool
#10 0x12004ce34 in main(...) in /tmp/atomAAAamlsFa/prog1.tool
#11 0x12002e608 in __start(...) in /tmp/atomAAAamlsFa/prog1.tool
(ladebug) listobj
section Start Addr End Addr
------------------------------------------------------------------------------
/tmp/atomAAAamlsFa/prog1.tool
.text 0x120000000 0x12012ffff
.data 0x140000000 0x140019fff
.bss 0x14001a000 0x14002471f
Something within the "elfhash()" method inside of
"obj_resolve_symname()" is causing a SEGV error.
The error message received when processed without the debugger is,
"atom: Error: Command '/usr/users/rcx/tmp/atomAAAapjcBa/prog1.tool'
terminated with receipt of SIGSEGV signal.
atom: Error: A fatal error has occured. This could be caused by a lack
of space in /usr/users/rcx/tmp, or an instrumentation code error.
Check /usr/users/rcx/tmp, or run atom with the -debug switch."
I checked the "tmp" directory and there was plenty of space. That is
why I ran the instrumentation through ladebug.
Once again, running the same instrumentation files against a smaller,
non-threaded application did not produce the error and gave expected
output results.
Any help in determining why I receive an error in the "elfhash()"
method of the atom program is appreciated.
OS: OSF1
OS version: V5.1B
OS revision: 2650
reply other threads:[~2005-04-07 19:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox