]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't print more lines of a stack-trace than were obtained. Thanks to Bart
authorNicholas Nethercote <njn@valgrind.org>
Sun, 13 Aug 2006 04:48:25 +0000 (04:48 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Sun, 13 Aug 2006 04:48:25 +0000 (04:48 +0000)
Van Assche for spotting.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5999

coregrind/m_stacktrace.c

index 0eb2d0e4f67750bfceba5414e47957749fba3189..c502a3f5a3edaef3e67df801ee1ba3d6e439c15a 100644 (file)
@@ -412,8 +412,8 @@ void VG_(pp_StackTrace) ( StackTrace ips, UInt n_ips )
 void VG_(get_and_pp_StackTrace) ( ThreadId tid, UInt n_ips )
 {
    Addr ips[n_ips];
-   VG_(get_StackTrace)(tid, ips, n_ips);
-   VG_(pp_StackTrace) (     ips, n_ips);
+   UInt n_ips_obtained = VG_(get_StackTrace)(tid, ips, n_ips);
+   VG_(pp_StackTrace)(ips, n_ips_obtained);
 }