+2005-05-15 Tom Tromey <tromey@redhat.com>
+
+ * stacktrace.cc (getLineNumberForFrame): Use _Jv_GetSafeArg.
+
2005-05-13 Bryce McKinlay <mckinlay@redhat.com>
PR libgcj/21557
#endif
// Use dladdr() to determine in which binary the address IP resides.
#if defined (HAVE_DLFCN_H) && defined (HAVE_DLADDR)
- extern char **_Jv_argv;
Dl_info info;
jstring binaryName = NULL;
+ const char *argv0 = _Jv_GetSafeArg(0);
void *ip = frame->ip;
_Unwind_Ptr offset = 0;
-
+
if (dladdr (ip, &info))
{
if (info.dli_fname)
return;
// addr2line expects relative addresses for shared libraries.
- if (strcmp (info.dli_fname, _Jv_argv[0]) == 0)
+ if (strcmp (info.dli_fname, argv0) == 0)
offset = (_Unwind_Ptr) ip;
else
offset = (_Unwind_Ptr) ip - (_Unwind_Ptr) info.dli_fbase;