com php-src: Fixed zbacktrace: .gdbinit
| From: | Xinchen Hui | Date: | Thu, 28 Aug 2014 09:03:27 +0000 |
| Subject: | com php-src: Fixed zbacktrace: .gdbinit | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-81252@lists.php.net to get a copy of this message | ||
Commit: 537344161f9d1528d9c8095883def9519fc8f99e
Author: Xinchen Hui <laruence@php.net> Thu, 28 Aug 2014 17:03:27 +0800
Parents: bc3d9b3ba29c8f29bf3247f7718a03a484093615
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=537344161f9d1528d9c8095883def9519fc8f99e
Log:
Fixed zbacktrace
Changed paths:
M .gdbinit
Diff:
diff --git a/.gdbinit b/.gdbinit
index 72d3085..c1ef530 100644
--- a/.gdbinit
+++ b/.gdbinit
@@ -48,7 +48,7 @@ define print_cvs
end
define dump_bt
- set $ex = $arg0->prev_execute_data
+ set $ex = $arg0
while $ex
printf "[%p] ", $ex
set $func = $ex->func
@@ -65,7 +65,11 @@ define dump_bt
end
end
- printf "%s(", $func->common.function_name->val
+ if $func->common.function_name
+ printf "%s(", $func->common.function_name->val
+ else
+ printf "(main"
+ end
set $callFrameSize = (sizeof(zend_execute_data) + sizeof(zval) - 1) / sizeof(zval)
@@ -119,7 +123,11 @@ define dump_bt
printf "??? "
end
if $func != 0
- printf "%s:%d ", $func->op_array.filename->val, $ex->opline->lineno
+ if $func->type == 2
+ printf "%s:%d ", $func->op_array.filename->val, $ex->opline->lineno
+ else
+ printf "[internal function]"
+ end
end
set $ex = $ex->prev_execute_data
printf "\n"