Remove tracer (debugger "heaptrace" command)
[hiphop-php.git] / hphp / runtime / debugger / cmd / cmd_frame.cpp
blob7bb1ec7875f697a08bcc0a2c012b8d26c050ec10
1 /*
2 +----------------------------------------------------------------------+
3 | HipHop for PHP |
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #include "hphp/runtime/debugger/cmd/cmd_frame.h"
18 #include "hphp/runtime/debugger/cmd/cmd_up.h"
19 #include "hphp/runtime/debugger/cmd/cmd_where.h"
21 namespace HPHP { namespace Eval {
22 ///////////////////////////////////////////////////////////////////////////////
24 TRACE_SET_MOD(debugger);
26 void CmdFrame::help(DebuggerClient &client) {
27 client.helpTitle("Frame Command");
28 client.helpCmds(
29 "[f]rame {index}", "jumps to one particular frame",
30 nullptr
32 client.helpBody(
33 "Use '[w]here' command to find out the frame number. Use 'f 0' to jump "
34 "back to the most recent frame or the innermost frame. Use 'f 999' or "
35 "some big number to jump to the outermost frame."
39 void CmdFrame::onClient(DebuggerClient &client) {
40 if (DebuggerCommand::displayedHelp(client)) return;
41 if (client.argCount() != 1) {
42 help(client);
43 } else {
44 CmdWhere().fetchStackTrace(client);
45 client.moveToFrame(CmdUp::ParseNumber(client));
49 ///////////////////////////////////////////////////////////////////////////////