Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] [lldb] [debugger] miscellaneous issues #8596

Closed
11 tasks
timotheecour opened this issue Aug 9, 2018 · 0 comments
Closed
11 tasks

[WIP] [lldb] [debugger] miscellaneous issues #8596

timotheecour opened this issue Aug 9, 2018 · 0 comments

Comments

@timotheecour
Copy link
Member

timotheecour commented Aug 9, 2018

(closing until I clean this up)

easy

  • nim --debugger:native --lldb[:path/to/lldb] file.nim arg1 arg2 should compile and run via lldb -- app arg1 arg2 (likewise: --gdb[path/to/gdb] would compile and run via gdb specific syntax, ie: gdb --args app arg1 arg2

major

  • lldb should have Nim added as a language plugin; it should have bulk of it's logic written in Nim and be dlopen'd in lldb; see also [2]
  • calling code (eg via p mynimfun) via unmangled names should be supported
  • b mynimfun doesn't work
    WORKAROUND: rbreak \bmynimfun_ (ie, regex) ; or b mynimfun[TAB] for auto-completion
  • stacktraces should show demangled names instead of mangled ones:
    * frame #0: 0x0000000100000dd8 app fun2_ALFlENhZsqTbOkwPqw67Tg_2 + 40 at ...
  • sample code showing how to write lldb plugins for nim (maybe wrapping around lldb's python plugin api)
  • lldb nim plugin should pretty-print variables correctly, eg:
(const (anonymous struct)) TM_p8kKrP3l1XJY080YwGLkNw_5 = {
  Sup = (len = 8, reserved = 4611686018427387912)
  data = ([0] = 'c', [1] = 'o', [2] = 'u', [3] = 'n', [4] = 't', [5] = 'e', [6] = 'r', [7] = ':', [8] = '\0')
}

=> should show as { Sup = len=8, reserved = ..., data = "counter:" }
see related PR: Gdb pretty printers by krux02 · Pull Request #8263 · nim-lang/Nim

minor

  • lldb seems to work with an app built via --debugger:native ; docs should clarify this (including nim --fullhelp | grep lldb)
  • lldb app gives warning (for me, on OSX)ImportError: cannot import name _remove_dead_weakref
  • remove ENDB related code since it is deprecated in favor of gdb,lldb ; this'll cleanup nim a bit EDIT: endb can be revived, it's useful

maybe related

related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant