diff --git a/tldr/caller b/tldr/caller new file mode 100644 index 00000000..af2e7d0a --- /dev/null +++ b/tldr/caller @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# caller + +> Print function context. +> More information: . + +- Print the line and filename where the current function was called: + +`caller` + +- Print the line, function and filename where the current function was called: + +`caller 0` + +- Print the line, the function name and the filename of a function call `n` frames back: + +`caller {{n}}` diff --git a/tldr/linux/coredumpctl b/tldr/linux/coredumpctl index cfe7cd92..71049896 100644 --- a/tldr/linux/coredumpctl +++ b/tldr/linux/coredumpctl @@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git - List all captured core dumps: -`coredumpctl list` +`coredumpctl` - List captured core dumps for a program: @@ -20,6 +20,10 @@ source: https://github.com/tldr-pages/tldr.git `coredumpctl info {{PID}}` +- Invoke debugger using the last core dump: + +`coredumpctl debug` + - Invoke debugger using the last core dump of a program: `coredumpctl debug {{program}}` diff --git a/tldr/llvm-mc b/tldr/llvm-mc new file mode 100644 index 00000000..ec9a76d5 --- /dev/null +++ b/tldr/llvm-mc @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# llvm-mc + +> LLVM Machine Code Playground. It provides a set of tools for working with LLVM machine code. +> Part of LLVM. +> More information: . + +- Assemble assembly code file into object file with machine code: + +`llvm-mc --filetype=obj -o {{path/to/output.o}} {{path/to/input.s}}` + +- Disassemble object file with machine code into assembly code file: + +`llvm-mc --disassemble -o {{path/to/output.s}} {{path/to/input.o}}` + +- Compile LLVM bit code file into assembly code: + +`llvm-mc -o {{path/to/output.s}} {{path/to/input.bc}}` + +- Assemble assembly code from standard input stream and show encoding to standard output stream: + +`echo "{{addl %eax, %ebx}}" | llvm-mc -show-encoding -show-inst` + +- Disassemble machine code from standard input stream for specified triple: + +`echo "{{0xCD 0x21}}" | llvm-mc --disassemble -triple={{target_name}}` diff --git a/tldr/timew b/tldr/timew index c300859e..0e27a421 100644 --- a/tldr/timew +++ b/tldr/timew @@ -8,22 +8,30 @@ source: https://github.com/tldr-pages/tldr.git > A time tracking tool used to measure the duration of activities. > More information: . -- Start a new stopwatch, giving a tag name to the activity being tracked: +- Start tracking an activity: + +`timew start` + +- Tag the current activity: + +`timew tag {{activity_tag}}` + +- Start tracking and tag a new activity: `timew start {{activity_tag}}` -- View running stopwatches: - -`timew` - -- Stop the stopwatch with a given tag name: - -`timew stop {{activity_tag}}` - -- Stop all running stopwatches: +- Stop the current activity: `timew stop` -- View tracked items: +- Track an activity in the past: + +`timew track {{start_time} - {{end_time}} {{activity_tag}}` + +- View tracked items of the day: `timew summary` + +- View report for the last day, week, current month, etc.: + +`timew summary :{{today|yesterday|week|lastweek|month|lastmonth|year|lastyear}}`