numba-dpex icon indicating copy to clipboard operation
numba-dpex copied to clipboard

GDB support tracker

Open akharche opened this issue 4 years ago • 0 comments

High-level objective

  • [x] Add initial support of DWARF data #26

Fix bugs

  • [x] GDB fails on "-O0" generated IR Initialize issues with code-generation #39, #285 (Possibly related to #88)
    • [x] Current llvm-spirv causes an error due to unsafe address space casting. #364, #372, #432
  • [x] #382 Double function call in Numba, wrapper or wrong debug info generation. Blocker for backtrace and local variables.

Debugging features to support

Fulfill gap with Numba functionality

  • [x] User must be able to step the code line by line, and also read and write the function arguments and local variables #325
  • [x] Setting breakpoints with function names #326
  • [x] Call stack (aka. Backtrace) should be supported, when an offloaded function is calling another (inlined?) function #328
  • [x] Setting breakpoints with variable values (e.g. “break if a == 1”) #327
  • [x] Core dumping #324

Other features

  • [x] #329 Consider improving support of complex data types. With “vanilla” Numba, debugger can only analyse the contents of simple types, such as integers and doubles. But with a numpy array, debugger output starts to be difficult for an average user. For an example, see https://numba.pydata.org/numba-doc/latest/user/troubleshoot.html#running-with-gdb-enabled, in particular how the debugger shows the variable “c” (which is a numpy array). We should aim to show such types as single objects, similar to how we do it with C++ class objects.

Single kernel function, offloaded:

  • [x] Set a breakpoint in kernel, using formats
    • [x] “break function_name” #326
    • [x] “break filename:function_name" #326
    • [x] “break filename:line_number"
  • [x] Step through the kernel, line by line (command “next”)
  • [ ] #483

A kernel function calling another offloaded function:

  • [x] Debugger can hit breakpoints in both functions #37
  • [x] Output of backtrace (command “backtrace”) #328
  • [x] Step inside function calls (command “step”) #352
  • [x] List of function names (command “info functions”) #330, #478

Variables: #338

  • [x] Show list of variables  (command “info locals”) #36
  • [x] See variable types (command “ptype variable”) #331
  • [x] See variable values (command “print variable”) #332
  • [x] Set conditional breakpoints (command “break condition”) #327
  • [x] #437
  • [x] #484
  • [x] #325 Overwrite the value of a variable (command “print variable = <new_value>”)
  • [ ] https://github.com/numba/numba/issues/7527

Non-functional requirements

  • [x] End-user documentation for each feature #380
  • [x] Test for each feature #365

Additional

  • [x] #525
  • [ ] #526
  • [x] #527
  • [x] #528
  • [ ] #465

Numba 0.55 (#654)

  • [x] #655 (https://github.com/numba/numba/issues/7415)

akharche avatar Jan 13 '21 13:01 akharche