Git Product home page Git Product logo

gdb-syntax-vscode's People

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

gitmensch

gdb-syntax-vscode's Issues

print settings

When inspecting some of my scripts I've found some print settings be not recognized. Example:

set print elements 250
set print repeats 20
set print frame-arguments all

Also python scripts can add their own sub-settings, in an example I use:

set print cprint-pretty-display on
set print cprint-display-mode 6

I suggest to:

  • add the three first ones
  • add a last "catch-all" for everything not matched yet, so more or less set print .* with the last group to be colored in either white or yellow

What do you think?

FR: support for "save" command

Save breakpoint definitions as a script.

List of save subcommands:

save breakpoints -- Save current breakpoint definitions as a script.
save gdb-index -- Save a gdb-index file.
save tracepoints -- Save current tracepoint definitions as a script.

Type "help save" followed by save subcommand name for full documentation.
Type "apropos word" to search for commands related to "word".
Type "apropos -v word" for full documentation of commands related to "word".
Command name abbreviations are allowed if unambiguous.

add `nexti` / `stepi` commands

I'd add these directly to the step/next commands we already have, syntax is the same, either full words or ni / si.
Feel free to assign it to me for a later date.

Fix parsing of offffffff

From closed PR #9, right now offfffff is valid and shouldn't be. Needs to fix each patterns using off with regex off?\\b
Also needs to be sur on|off|unlimited not be parsed in command, document or other unexpected place.

VSIX should not package test files

currently the following "additional" / unneeded files are packaged and therefore installed:

  • .github
  • hello_world
  • scripts
  • tests

Please consider adjusting the vsix building to drop those.

FR: support for explicit locations

Currently the locations are used at least for break/tbreak/until and the returning name is markup.underline.link.location.gdb.
The current regex is (?:[ \t]+([^ \t]+)).

This regex matches all of the Linespec-Locations:
funcname or label
funcname:label
some.source:funcame
123
+5
-6
some.source:123
and also the Address-Locations
0x123546 (simple)
0x123546+d1212*55 (complex: expression, but only without white space)

So far it doesn't match the Explicit-Locations which can be combined in any order:
-function prog_ -label ENTRY_prog -source some.source

I suggest to add new group "#location" and use that for every expected place, then add the explicit locations in there.

more settings

I'm not sure, but maybe we can "group" on/off/unlimited settings and similar into one expression, to not increase the number of entries too much?

Missing:

  • confirm and verbose with #on_off_unlimited
  • output-radix and input-radix with #numeric
  • height, width and listsize with a new #positive_or_unlimited -> (u(?:n(?:l(?:i(?:m(?:i(?:t(?:e(?:d)?)?)?)?)?)?)?)|\d+)

add `help` and `apropros`

I've started this but dropped it from #13 to keep it concise.
Feel free to assign this enhancement issue to me and drop a ping if I did not send in something in the next two weeks.

Syntax: help or apr(opos), then separatorm then one word (actually one can pass multiple words, all but the first one are ignored - should we match this ignored words - and if yes just as italic?)

differentiate jump label to jump function

Currently jump rendering only accept direct NUM or offset but, no named label, nor computed offset like $_+0x123
Thats because i don't know how to differentiate jump label from jump function

add `shell` and `pipe` commands

! or she(ll) + to end of line with shell commands
| or pip(e) + normal commands + | + to end of line with shell commands

adding it may un-break (at least at end of line) the following example, too:

	set logging off
	shell target="$(/usr/bin/head -1 /tmp/gdb-objc_symbols | /usr/bin/head -1 | /usr/bin/awk -F '"' '{ print $2 }')"; objc-symbols "$target" | SymTabCreator -o /tmp/gdb-symtab
	set logging on

on/off should be word limited

no priority at all, just stumbled over this when checking the issue14 test:

set detach-on-fork off

the off should be highlighted, the "on" not, because it is part of a word, not a word on its own, currently both are highlighted

please co-publish on open-vsx

Please make this extension available to Open VSX marketplace, this will also make it directly available for VSCodium and Gitpod.

Open VSX is a vendor-neutral open-source alternative to the Visual Studio Marketplace. It provides a server application that manages VS Code extensions in a database, a web application similar to the VS Code Marketplace, and a command-line tool for publishing extensions similar to vsce.

There is a guide for publishing and after the initial setup it is just a matter of osvx publish (similar to the MS marketplace).

If wanted then there are github actions that can publish to both marketplaces on tagging.

FR: support for 'quit' command

Often used for "automated" GDB scripting. The first result I've got on SO that uses this:

set pagination off
set logging file gdb.txt
set logging on
file a.out
b f
commands
backtrace
continue
end
info breakpoints
r
set logging off
quit

condition handling

So far we have conditions (for break if / condition / if / while) highlighted as markup.italic.expression.gdb.
It likely would be useful to:

  • have the condition in an own rule we just reference
  • actually do some condition handling in there, using already defined patterns like convenience, string, numeric + a new one for operators and a general one - and only have this as markup.italic.expression.gdb

this would lead to convenience variables, strings, numbers, ... use the same highlighting they have outside of a condition also within a condition.

FR: support for "backtrace" command

backtrace, where, bt
Print backtrace of all stack frames, or innermost COUNT frames.
Usage: backtrace [OPTION]... [QUALIFIER]... [COUNT | -COUNT]

Options:
  -entry-values no|only|preferred|if-needed|both|compact|default
    Set printing of function arguments at function entry.
    GDB can sometimes determine the values of function arguments at entry,
    in addition to their current values.  This option tells GDB whether
    to print the current value, the value at entry (marked as val@entry),
    or both.  Note that one or both of these values may be <optimized out>.

  -frame-arguments all|scalars|none|presence
    Set printing of non-scalar frame arguments.

  -raw-frame-arguments [on|off]
    Set whether to print frame arguments in raw form.
    If set, frame arguments are printed in raw form, bypassing any
    pretty-printers for that value.

  -frame-info auto|source-line|location|source-and-location|location-and-address|short-location
    Set printing of frame information.

  -past-main [on|off]
    Set whether backtraces should continue past "main".
    Normally the caller of "main" is not of interest, so GDB will terminate
    the backtrace at "main".  Set this if you need to see the rest
    of the stack trace.

  -past-entry [on|off]
    Set whether backtraces should continue past the entry point of a program.
    Normally there are no callers beyond the entry point of a program, so GDB
    will terminate the backtrace there.  Set this if you need to see
    the rest of the stack trace.

  -full
    Print values of local variables.

  -no-filters
    Prohibit frame filters from executing on a backtrace.

  -hide
    Causes Python frame filter elided frames to not be printed.

For backward compatibility, the following qualifiers are supported:

   full       - same as -full option.
   no-filters - same as -no-filters option.
   hide       - same as -hide.

With a negative COUNT, print outermost -COUNT frames.

most common in a script is likely bt -1 or backtrace 4 and/or the use of the options -frame-info and -frame-arguments

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.