[Lldb-commits] [PATCH] D57830: Add functionality to trace a function within lldb

2019-02-06 Thread Aditya Kumar via Phabricator via lldb-commits
hiraditya created this revision.
hiraditya added reviewers: xiaobai, clayborg.
Herald added a reviewer: serge-sans-paille.
Herald added a project: LLDB.

Repository:
  rLLDB LLDB

https://reviews.llvm.org/D57830

Files:
  examples/python/process_events.py


Index: examples/python/process_events.py
===
--- examples/python/process_events.py
+++ examples/python/process_events.py
@@ -184,6 +184,12 @@
 help='Specify the timeout in seconds to wait for process state change 
events.',
 default=lldb.UINT32_MAX)
 parser.add_option(
+'-f',
+'--trace-function',
+type='string',
+dest='trace_function',
+help='Trace a function during execution, Warning: tracing is really 
slow.')
+parser.add_option(
 '-e',
 '--environment',
 action='append',
@@ -275,6 +281,9 @@
 for bp in options.breakpoints:
 debugger.HandleCommand("_regexp-break %s" % (bp))
 run_commands(command_interpreter, ['breakpoint list'])
+if launch_info and options.trace_function:
+debugger.HandleCommand("_regexp-break &%s" % 
(options.trace_function))
+run_commands(command_interpreter, ['breakpoint list'])
 
 for run_idx in range(options.run_count):
 # Launch the process. Since we specified synchronous mode, we 
won't return
@@ -348,7 +357,10 @@
 stop_idx += 1
 print_threads(process, options)
 print "continuing process %u" % (pid)
-process.Continue()
+if options.trace_function:
+process.GetThreadAtIndex(0).StepInto()
+else:
+process.Continue()
 elif state == lldb.eStateExited:
 exit_desc = process.GetExitDescription()
 if exit_desc:


Index: examples/python/process_events.py
===
--- examples/python/process_events.py
+++ examples/python/process_events.py
@@ -184,6 +184,12 @@
 help='Specify the timeout in seconds to wait for process state change events.',
 default=lldb.UINT32_MAX)
 parser.add_option(
+'-f',
+'--trace-function',
+type='string',
+dest='trace_function',
+help='Trace a function during execution, Warning: tracing is really slow.')
+parser.add_option(
 '-e',
 '--environment',
 action='append',
@@ -275,6 +281,9 @@
 for bp in options.breakpoints:
 debugger.HandleCommand("_regexp-break %s" % (bp))
 run_commands(command_interpreter, ['breakpoint list'])
+if launch_info and options.trace_function:
+debugger.HandleCommand("_regexp-break &%s" % (options.trace_function))
+run_commands(command_interpreter, ['breakpoint list'])
 
 for run_idx in range(options.run_count):
 # Launch the process. Since we specified synchronous mode, we won't return
@@ -348,7 +357,10 @@
 stop_idx += 1
 print_threads(process, options)
 print "continuing process %u" % (pid)
-process.Continue()
+if options.trace_function:
+process.GetThreadAtIndex(0).StepInto()
+else:
+process.Continue()
 elif state == lldb.eStateExited:
 exit_desc = process.GetExitDescription()
 if exit_desc:
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D62732: [RISCV] Add SystemV ABI

2023-10-24 Thread Aditya Kumar via Phabricator via lldb-commits
hiraditya added a comment.
Herald added subscribers: wangpc, jobnoorman, luke.

We should close this as it has been pushed upstream as part of 
https://reviews.llvm.org/rG847de9c332775d1841fec9fea5cb5c41592a4c8f


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62732/new/

https://reviews.llvm.org/D62732

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits