]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Be more concise.
authorNicholas Nethercote <njn@valgrind.org>
Sun, 15 May 2005 03:30:56 +0000 (03:30 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sun, 15 May 2005 03:30:56 +0000 (03:30 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3715

coregrind/vg_symtab2.c

index 233a648636150243d4b69a5882efb165e47f8536..db7a75346d2666a79bff18d2f7b1ebadb9d5d9df 100644 (file)
@@ -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 UIntregaddr(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;