From 5b41896f535cd8d523681b25cb4e48efc470d994 Mon Sep 17 00:00:00 2001 From: "alan (NyxTrail)" Date: Wed, 13 Mar 2024 08:45:06 +0000 Subject: [PATCH] Add a man page for udcli --- debian/control | 3 +- debian/libudis86-doc.install | 2 +- debian/rules | 10 +++- debian/udcli.1.rst | 89 ++++++++++++++++++++++++++++++++++++ debian/udcli.manpages | 1 + 5 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 debian/udcli.1.rst create mode 100644 debian/udcli.manpages diff --git a/debian/control b/debian/control index 5243eaf..9ea75fc 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,8 @@ Source: udis86 Section: misc Priority: optional Maintainer: Alan M Varghese (NyxTrail) -Build-Depends: debhelper-compat (= 13) +Build-Depends: debhelper-compat (= 13), + pandoc Standards-Version: 4.6.2 Homepage: https://github.com/canihavesomecoffee/udis86 Rules-Requires-Root: no diff --git a/debian/libudis86-doc.install b/debian/libudis86-doc.install index 7276ecd..92b7112 100644 --- a/debian/libudis86-doc.install +++ b/debian/libudis86-doc.install @@ -1 +1 @@ -usr/share/doc +usr/share/doc/udis86 diff --git a/debian/rules b/debian/rules index 2e4c173..430ebea 100755 --- a/debian/rules +++ b/debian/rules @@ -12,5 +12,11 @@ override_dh_autoreconf: dh_autoreconf -- ./autogen.sh override_dh_auto_configure: dh_auto_configure -- --with-python=/usr/bin/python3 -#override_dh_install: -# dh_install --list-missing -X.la -X.pyc -X.pyo +override_dh_auto_install: + mkdir -p debian/tmp/usr/share/doc/udcli + pandoc debian/udcli.1.rst --standalone \ + --variable=header:"udcli User Manual" \ + --variable=section:1 \ + --from rst \ + --to man > debian/tmp/usr/share/doc/udcli/udcli.1 + dh_auto_install diff --git a/debian/udcli.1.rst b/debian/udcli.1.rst new file mode 100644 index 0000000..8623598 --- /dev/null +++ b/debian/udcli.1.rst @@ -0,0 +1,89 @@ +:title: udcli + +NAME +==== +udcli - A CLI tool for quick disassembly of x86 and x86-64 class instruction set architectures. + +SYNOPSIS +======== +**udcli** [-option(s)] file + +DESCRIPTION +=========== +**udcli** is a CLI front-end to the Udis86 Disassembler library. + +OPTIONS +======= +**-16** + Set the disassembly mode to 16 bits. + +**-32** + Set the disassembly mode to 32 bits. (default) + +**-64** + Set the disassembly mode to 64 bits. + +**-intel** + Set the output to INTEL (NASM like) syntax. (default) + +**-att** + Set the output to AT&T (GAS like) syntax. + +**-v ** + Set vendor. = {intel, amd}. + +**-o ** + Set the value of the program counter to . (default = 0) + +**-s ** + Set the number of bytes to skip before disassembly to . + +**-c ** + Set the number of bytes to disassemble to . + +**-x** + Set the input mode to whitespace separated 8-bit numbers in hexadecimal + representation. + Example: 0f 01 ae 00 + +**-noff** + Do not display the offset of instructions. + +**-nohex** + Do not display the hexadecimal code of instructions. + +**-eflags** + Display information on EFLAGS register. + +**-access** + Display access information on operand. + +**-implicit** + Display implicit registers used or modified by the instruction. + +**-h** + Display this help message. + +**--version** + Show version + +Example +======= +Usage example:: + + echo "65 67 89 87 76 65 54 56 78 89 09 00 90" | udcli -32 -x + +will result in output such as this:: + + 0000000080000800 656789877665 mov [gs:bx+0x6576], eax + 0000000080000806 54 push esp + 0000000080000807 56 push esi + 0000000080000808 7889 js 0x80000793 + 000000008000080a 0900 or [eax], eax + 000000008000080c 90 nop + +Author +====== +This version of Udis86 is based on a fork of the original project of the same name by +`Willem (canihavesomecoffee) `_. Udis86 was +originally written by `Vivek Thampi`_. diff --git a/debian/udcli.manpages b/debian/udcli.manpages new file mode 100644 index 0000000..957e5d1 --- /dev/null +++ b/debian/udcli.manpages @@ -0,0 +1 @@ +usr/share/doc/udcli/udcli.1