Giter Club home page Giter Club logo

lldb-write's Introduction

lldb-write

Tests License: MIT

Demo

A Python script for lldb that writes the output of a command to a given file.

Installation

Import the script manually:

(lldb) command script import /path/to/lldb-write/write.py

Or add command script import /path/to/lldb-write/write.py to ~/.lldbinit.

Usage

(lldb) write filename command

Example:

(lldb) write reg.txt register read

lldb-write's People

Contributors

4iar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lldb-write's Issues

Not taking commands which has argument in it

HI,

I am trying to execute following command to save info inside a file. But it is giving error.

command:
write $FILE_NAME image lookup --address $SYMBOL_ADDRRESS

Error:
usage: write [-h] filename command [command ...]
write: error: unrecognized arguments: --address 0x100004AAC

1. Allow absolute paths; 2. File not closed; 3. ANSI escape sequences not stripped

There are a few problems with this code:

  1. It should allow absolute paths. Specifically, it should not prepend ./ to the path. It should simply leave the path alone.
  2. The file isn't closed.
  3. When you send the output to a file, LLDB includes what it would have sent to the terminal verbatim. For a color terminal, this includes ANSI escape sequences. These should be stripped from the output.

I would have created a branch and submitted a pull request, but don't have write-permission to the repo; so here's a patch.
patch.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.