Giter Site home page Giter Site logo

atom-gdb-debugger's People

Contributors

esden avatar gsmcmullin avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atom-gdb-debugger's Issues

Binary name wildcard

Allow the use of *.elf as the binary name so that the settings can be generic and project independent.

Usability enhancements

CLI

  • Resizable panel
  • Enter should repeat last command
  • Support command history
  • Hide CLI input when not available
  • Grab focus after single stepping from CLI

Config

  • Select GDB from dropdown
  • Select target binary from file chooser
  • Read GDB init commands from .gdbinit
  • Validate config on dialog acceptance

Feedback from GDB

  • Report errors on connect or in init commands
  • Report errors on failed user commands (from key binding)
  • Report reason for target exit and maybe stop
  • Report exit code on normal target exit
  • Provide feedback when target ignores SIGINT

Variable watch view

  • Indicate out-of-scope variables in watch view
  • Indicate hit watchpoint in watch view
  • ~~~Highlight parents of changed values in tree~~~
  • ~~~Expand collapsed branches in hidden watchpoints are hit~~~
  • Allow selection of format (hex, decimal, etc) for displayed values

Editor integration

  • Popup hover values in tooltip style rather than workspace notifications.
  • Add a shortcut to watch an expression from the editor
  • Add context menu to watch expressions
  • Add context menu to set breakpoints

Target interuption permutations

There are 4 different scenarios requiring different mechanisms for interrupting the target.

On POSIX systems:

  • Local child processes must be sent SIGINT directly to the child
  • For remote targets SIGINT must be sent to GDB

On Windows systems:

  • Local targets must have a debug exception generated by calling DebugBreakProcess with a handle to the child process.
  • For remote targets GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0) can be used to send SIGINT to GDB, but this requires the sender to share a console window with GDB, and ignore the signal.

POSIX signals are easily sent with Node's process.kill(pid, signal). The problem remains of how to tell if the target is remote. These are options:

  • Have a check box in the config dialog
  • Check for magic pid 42000 reported by GDB
  • Try send SIGINT to GDB, and then to reported PID if it hasn't halted after a timeout.

How to even make Windows API calls from JS remains a mystery.

Watchpoint set on stack variable can point to the wrong thing

Stack local variables may now be added to the variable watch view, but double clicking on them in the expanded call stack view. This works well for inspection and assignments, but when setting a watchpoint on the variable object things can go wrong.

When the user requests a watchpoint on a variable object, we ask GDB for the expression for the object with -var-info-path-expression <path>, and then set a watchpoint on this expression with -break-watch <expr>. This expression may not be evaluated in the context in which it was created.

Object.require is deprecated.

Use remote.Dialog instead of remote.require("dialog")

Object.require (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/electron-shims.js:57:12)
Object.<anonymous> (/Users/esdentem/.atom/packages/atom-gdb-debugger/lib/config-view.coffee:12:19)
Object.<anonymous> (/Users/esdentem/.atom/packages/atom-gdb-debugger/lib/config-view.coffee:259:4)
Module._compile (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
Object..coffee (/Applications/Atom Beta.app/Contents/Resources/app.asar/src/compile-cache.js:216:21)
Module.load (module.js:458:32)

F11 overrides toggle fullscreen binding

@FabianGeiselhart pointed out on #5 :

I think the F11 button is a really bad choice, b/c it toggles the fullscreenmode on most systems...

I know the possibility of creating own keybindings files, but I think overwriting an shortcut as important as F11 is not a good idea anyway...
Using F8, F9, and F10 instead of F9 F10 F11 would be better on my System

The default keybindings are chosen to match those used by Visual Studio Code:
https://code.visualstudio.com/Docs/customization/keybindings#_debug

@esden argued the merits of keeping keys compatible with other tools.

I'm leaving this issue open for comment. If there are strong opinions I'll consider changing the defaults. Users can also reconfigure the keys in Atom using a custom key map.

Uncaught TypeError: Cannot read property 'getCursorBufferPosition' of undefined

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.19.5 x64
Electron: 1.6.11
OS: linux 4.12.8-2-ARCH
Thrown From: atom-gdb-debugger package 0.2.2

Stack Trace

Uncaught TypeError: Cannot read property 'getCursorBufferPosition' of undefined

At /home/asgreywolf/.atom/packages/atom-gdb-debugger/lib/editor-integration.coffee:78

TypeError: Cannot read property 'getCursorBufferPosition' of undefined
    at EditorIntegration.module.exports.EditorIntegration._toggleBreakpoint (/packages/atom-gdb-debugger/lib/editor-integration.coffee:78:27)
    at /packages/atom-gdb-debugger/lib/editor-integration.coffee:1:1)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:265:29)
    at /usr/lib/atom/src/command-registry.js:3:59
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/lib/atom/node_modules/atom-keymap/lib/keymap-manager.js:606:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/lib/atom/node_modules/atom-keymap/lib/keymap-manager.js:397:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeyEvent (/usr/lib/atom/src/window-event-handler.js:100:36)
    at HTMLDocument.<anonymous> (/usr/lib/atom/src/window-event-handler.js:3:59)

Commands

     -6:59.6.0 intentions:highlight (input.hidden-input)
     -6:59.1.0 window:toggle-dev-tools (input.hidden-input)
     -3:51 intentions:highlight (input.hidden-input)
     -3:50.6.0 command-palette:toggle (input.hidden-input)
  3x -3:49.6.0 core:backspace (input.hidden-input)
     -3:46.9.0 core:confirm (input.hidden-input)
     -3:46.9.0 settings-view:core (input.hidden-input)
  2x -3:33.8.0 core:confirm (input.hidden-input)
  3x -1:18.9.0 atom-gdb-debugger:connect (input.hidden-input)
     -0:26.9.0 intentions:highlight (input.hidden-input)
     -0:26 command-palette:toggle (input.hidden-input)
     -0:24.7.0 core:confirm (input.hidden-input)
     -0:24.7.0 settings-view:core (input.hidden-input)
     -0:21.9.0 core:backspace (input.hidden-input)
     -0:21.2.0 core:confirm (input.hidden-input)
     -0:08.0 atom-gdb-debugger:toggle-breakpoint (input.hidden-input)

Non-Core Packages

activate-power-mode 2.0.0 
activate-power-mode-delete 0.6.1 
atom-beautify 0.30.5 
atom-gdb-debugger 0.2.2 
atom-material-syntax 1.0.6 
atom-material-syntax-dark 1.0.0 
atom-material-ui 2.0.4 
atom-polymer 0.13.0 
autoclose-html 0.23.0 
autocomplete-clang 0.11.3 
autocomplete-glsl 0.2.3 
autocomplete-java 1.2.7 
autocomplete-oracle 1.2.0 
autocomplete-python 1.10.1 
autoprefixer 3.7.1 
build 0.68.0 
build-make 0.13.0 
busy 0.7.0 
busy-signal 1.4.3 
clang-format 1.29.0 
color-picker 2.2.5 
convert-to-utf8 0.2.4 
csscomb 0.3.1 
dbg 1.6.1 
dbg-gdb 1.7.6 
docblockr 0.11.0 
git-control 0.9.0 
git-diff-details 1.4.0 
git-log 0.4.1 
git-plus 7.9.3 
git-projects 1.17.0 
git-time-machine 1.5.9 
github-issues 0.9.0 
graphviz-preview-plus 1.4.4 
Hydrogen 1.20.0 
hydrogen-xdbg 0.0.4 
imdone-atom 2.2.6 
imdone-atom-github 0.1.11 
intentions 1.1.5 
javascript-snippets 1.2.1 
jshint 1.8.6 
language-d 3.3.1 
language-dot 1.7.0 
language-glsl 2.0.1 
language-matlab 0.2.1 
language-opencl 0.1.1 
language-oracle 1.8.0 
linter 2.2.0 
linter-clang 4.1.2 
linter-cppcheck 0.2.3 
linter-csslint 1.3.4 
linter-gcc 0.7.1 
linter-javac 1.9.4 
linter-opencl 1.0.2 
linter-polymer 0.0.3 
linter-pycodestyle 2.0.2 
linter-ui-default 1.6.5 
linter-write-good 0.9.0 
minimap 4.29.6 
minimap-git-diff 4.3.1 
minimap-linter 2.0.2 
minimap-split-diff 0.3.7 
output-panel 0.3.4 
platformio-ide-terminal 2.5.5 
python-jedi 0.3.8 
script 3.15.0 
split-diff 1.4.3 
symbols-tree-view 0.14.0 
sync-settings 0.8.2 
tree-view-git-status 1.4.0 

"Configurable, per project" only works with one project in tree-view

Hello!

I'm on OSX 10.12.4 / atom 1.16.0.
When I try to add a second project in tree-view I can't configure atom-gdb-debugger for it.
It always switching to the first project in tree-view.
Opening the project in a new window resolves the issue.

I's there any config file for atom-gdb-debugger in the root-directory of the project?

Adding watchpoint to global array bug

After adding a watchpoint to a global array, and then restarting the debug session, causes the "remove" button to not work. After re-adding the array, all elements in the array are duplicated when expanded.

Have a look, I can create better instructions for this when I am at an editor again.

TextEditor.editorElement is deprecated.

TextEditor.prototype.editorElement has always been private, but now
it is gone. Reading the editorElement property still returns a
reference to the editor element but this field will be removed in a
later version of Atom, so we recommend using the element property instead.

TextEditor.editorElement (<embedded>:2459:16)
EditorIntegration._hookEditor (C:\Users\Giuseppe\.atom\packages\atom-gdb-debugger\lib\editor-integration.coffee:168:14)
<unknown> (C:\Users\Giuseppe\.atom\packages\atom-gdb-debugger\lib\editor-integration.coffee:3:59)
Workspace.observeTextEditors (<embedded>:28316:15)
new EditorIntegration (C:\Users\Giuseppe\.atom\packages\atom-gdb-debugger\lib\editor-integration.coffee:71:45)
Object.activate (C:\Users\Giuseppe\.atom\packages\atom-gdb-debugger\lib\atom-gdb-debugger.coffee:118:39)

Deprecated selector in `atom-gdb-debugger\styles\atom-gdb-debugger.less`

In atom-gdb-debugger\styles\atom-gdb-debugger.less:

Starting from Atom v1.13.0, the contents of atom-text-editor elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host and ::shadow pseudo-selectors, and prepend all your syntax selectors with syntax--. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:

  • .atom-text-editor .line.gdb-frame, :host .line.gdb-frame, atom-text-editor .line.gdb-frame, atom-text-editor::shadow .line.gdb-frame => .atom-text-editor .line.gdb-frame, :host .line.gdb-frame, atom-text-editor .line.gdb-frame, atom-text-editor.editor .line.gdb-frame

  • .atom-text-editor .line-number.gdb-bkpt .icon-right, :host .line-number.gdb-bkpt .icon-right, atom-text-editor .line-number.gdb-bkpt .icon-right, atom-text-editor::shadow .line-number.gdb-bkpt .icon-right => .atom-text-editor .line-number.gdb-bkpt .icon-right, :host .line-number.gdb-bkpt .icon-right, atom-text-editor .line-number.gdb-bkpt .icon-right, atom-text-editor.editor .line-number.gdb-bkpt .icon-right

  • .atom-text-editor .line-number.gdb-bkpt .icon-right:before, :host .line-number.gdb-bkpt .icon-right:before, atom-text-editor .line-number.gdb-bkpt .icon-right:before, atom-text-editor::shadow .line-number.gdb-bkpt .icon-right:before => .atom-text-editor .line-number.gdb-bkpt .icon-right:before, :host .line-number.gdb-bkpt .icon-right:before, atom-text-editor .line-number.gdb-bkpt .icon-right:before, atom-text-editor.editor .line-number.gdb-bkpt .icon-right:before

Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.

Where is the target binary of my C ++ program?

Hello,

I am looking to develop in C ++ with ATOM.
I followed this tutorial :
Tutorial
I installed MinGW on my PC under Windows 10.
I configured my Windows Path.
I restarted Windows to validate the new Path.
I installed gpp-compile.
OK 👍 I can compile my C ++ programs.
I installed atom-gdb-debugger.
I pressed F12 to configure the debugger, atom-gdb-debugger asks me for a binary target.
Where is the target binary of my C ++ program?

image

Deprecated selector in `atom-gdb-debugger/styles/atom-gdb-debugger.less`

In atom-gdb-debugger/styles/atom-gdb-debugger.less:

Starting from Atom v1.13.0, the contents of atom-text-editor elements are no longer encapsulated within a shadow DOM boundary. This means you should stop using :host and ::shadow pseudo-selectors, and prepend all your syntax selectors with syntax--. To prevent breakage with existing style sheets, Atom will automatically upgrade the following selectors:

  • .atom-text-editor .line.gdb-frame, :host .line.gdb-frame, atom-text-editor .line.gdb-frame, atom-text-editor::shadow .line.gdb-frame => .atom-text-editor .line.gdb-frame, :host .line.gdb-frame, atom-text-editor .line.gdb-frame, atom-text-editor.editor .line.gdb-frame

  • .atom-text-editor .line-number.gdb-bkpt .icon-right, :host .line-number.gdb-bkpt .icon-right, atom-text-editor .line-number.gdb-bkpt .icon-right, atom-text-editor::shadow .line-number.gdb-bkpt .icon-right => .atom-text-editor .line-number.gdb-bkpt .icon-right, :host .line-number.gdb-bkpt .icon-right, atom-text-editor .line-number.gdb-bkpt .icon-right, atom-text-editor.editor .line-number.gdb-bkpt .icon-right

  • .atom-text-editor .line-number.gdb-bkpt .icon-right:before, :host .line-number.gdb-bkpt .icon-right:before, atom-text-editor .line-number.gdb-bkpt .icon-right:before, atom-text-editor::shadow .line-number.gdb-bkpt .icon-right:before => .atom-text-editor .line-number.gdb-bkpt .icon-right:before, :host .line-number.gdb-bkpt .icon-right:before, atom-text-editor .line-number.gdb-bkpt .icon-right:before, atom-text-editor.editor .line-number.gdb-bkpt .icon-right:before

Automatic translation of selectors will be removed in a few release cycles to minimize startup time. Please, make sure to upgrade the above selectors as soon as possible.

Uncaught TypeError: Cannot read property 'editorElement' of undefined

  1. Right-click on a line with code.
  2. Add a breakpoint.

Atom: 1.20.0 x64
Electron: 1.6.11
OS: linux 4.12.13-1-ARCH
Thrown From: atom-gdb-debugger package 0.2.2

Stack Trace

Uncaught TypeError: Cannot read property 'editorElement' of undefined

At /home/pradana/.atom/packages/atom-gdb-debugger/lib/editor-integration.coffee:7

TypeError: Cannot read property 'editorElement' of undefined
    at posFromMouse (/packages/atom-gdb-debugger/lib/editor-integration.coffee:7:15)
    at EditorIntegration.module.exports.EditorIntegration._toggleBreakpoint (/packages/atom-gdb-debugger/lib/editor-integration.coffee:76:21)
    at /packages/atom-gdb-debugger/lib/editor-integration.coffee:1:1)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:265:29)
    at CommandRegistry.handleCommandEvent (/usr/lib/atom/src/command-registry.js:3:59)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/lib/atom/src/command-registry.js:166:19)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/usr/lib/atom/src/atom-environment.js:1338:28)
    at EventEmitter.outerCallback (/usr/lib/atom/src/application-delegate.js:334:25)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -4:49.9.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always)
     -4:32.1.0 atom-gdb-debugger:toggle-panel (ul.list-inline.tab-bar.inset-panel)
     -4:24.9.0 atom-gdb-debugger:configure (ul.list-inline.tab-bar.inset-panel)
     -4:23.1.0 atom-gdb-debugger:connect (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
  3x -4:13.1.0 core:move-left (input.hidden-input)
     -4:11.8.0 core:move-right (input.hidden-input)
     -3:58.4.0 command-palette:toggle (input.hidden-input)
  3x -3:49.7.0 core:backspace (input.hidden-input)
     -3:39.1.0 atom-gdb-debugger:toggle-breakpoint (input.hidden-input)
     -3:24.8.0 command-palette:toggle (input.hidden-input)
     -3:18.5.0 core:move-down (input.hidden-input)
     -3:17.8.0 core:confirm (input.hidden-input)
  2x -3:17.8.0 atom-gdb-debugger:toggle-breakpoint (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.5 
atom-gdb-debugger 0.2.2 
atom-ide-ui 0.3.3 
autocomplete-clang 0.11.3 
autocomplete-cmake 0.3.1 
build 0.68.0 
busy 0.7.0 
busy-signal 1.4.3 
file-icons 2.1.11 
highlight-selected 0.13.1 
ide-python 0.1.1 
ide-typescript 0.1.6 
intentions 1.1.5 
language-cmake 0.3.0 
language-ini 1.19.0 
linter 2.2.0 
linter-flake8 2.2.1 
linter-gcc 0.7.1 
linter-shellcheck 1.4.6 
linter-ui-default 1.6.10 
minimap 4.29.6 
monokai 0.24.0 
open-recent 5.0.0 
pigments 0.40.2 
platformio-ide-debugger 1.2.4 
platformio-ide-terminal 2.6.0 
tool-bar 1.1.0 

This is similar to #23 because both of these issues arise from adding a breakpoint via the atom-gdb-debugger UI.

Preset selection

It would be nice to be able to save GDB config presets that can be used when configuring a session. These presets should be project independent and stored globally.

Essential features

  • being able to configure it (aka able to setup a remote session with black magic)
  • being able to access the gdb command line
  • highlight the code line in the text editor where we are at the moment
  • start, continue, next, step, finish and interrupt accessible from UI
  • indicate where breakpoints are set
  • provide a way to display watchpoints
  • provide a way to display variable contents by moving the cursor in the text editor over a symbol
  • popup backtrace allowing user to select frame
  • sensible default keybindings
  • allow user to assign new values to variables

Add a register view on halt

I'd really find it useful if the "info reg" are neatly formated in a box under "Call Stacks" that can be expanded etc like the other boxes there.

Installing error under Linux

I get this error when I installed under this machine Linux axe-20aws2t12n 5.10.7-3-MANJARO #1 SMP PREEMPT Fri Jan 15 21:11:34 UTC 2021 x86_64 GNU/Linux

Fetching featured packages failed.Hide output…
internal/modules/cjs/loader.js:807
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /usr/lib/node_modules/atom-package-manager/node_modules/git-utils/build/Release/git.node: undefined symbol: _ZN2v82V818GlobalizeReferenceEPNS_8internal7IsolateEPm
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (/usr/lib/node_modules/atom-package-manager/node_modules/git-utils/src/git.js:3:22)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)

Watchpoint freezes when toggle connection

On OSX 10.12.5 defined watchpoints stay in the watchpoint-panel when toggle connection but don't work any more (in the cli "info watch" does not show any watchpoints).

When i define watchpoints in the config view they are loaded fine on the first connection.
but when toggling the connection they freeze as well.

Maybe a reload of the package at connection will help...

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.