From: Nicholas Nethercote Date: Sun, 15 May 2005 03:30:56 +0000 (+0000) Subject: Be more concise. X-Git-Tag: svn/VALGRIND_3_0_0~603 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4570a48d51cdc486804bcf754c15483088a54e8b;p=thirdparty%2Fvalgrind.git Be more concise. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3715 --- diff --git a/coregrind/vg_symtab2.c b/coregrind/vg_symtab2.c index 233a648636..db7a75346d 100644 --- a/coregrind/vg_symtab2.c +++ b/coregrind/vg_symtab2.c @@ -2252,21 +2252,14 @@ Bool VG_(get_filename_linenum)( Addr a, /* return a pointer to a register (now for 5 other impossible things before breakfast) */ -static UInt *regaddr(ThreadId tid, Int regno) +static UInt* regaddr(ThreadId tid, Int regno) { - UInt *ret = 0; - - ret = VGA_(reg_addr_from_tst)(regno, &VG_(threads)[tid].arch); + UInt* ret = VGA_(reg_addr_from_tst)(regno, &VG_(threads)[tid].arch); if (ret == 0) { - Char file[100]; - Int line; - Addr eip = VG_(get_IP)(tid); - - if (!VG_(get_filename_linenum)(eip, file, sizeof(file), &line)) - file[0] = 0; - VG_(printf)("mysterious register %d used at %p %s:%d\n", - regno, eip, file, line); + Char buf[100]; + VG_(describe_IP)( VG_(get_IP)(tid), buf, 100 ); + VG_(printf)("mysterious register %d used at %s\n", regno, buf); } return ret;