Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: luke-gru/debug
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ruby/debug
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 18 commits
  • 14 files changed
  • 10 contributors

Commits on Jun 4, 2025

  1. Add show_src_lines_frame option

    Both `up` and `down` only show 1 source line when called, I think it
    would be more useful if there was a configurable way to provide more
    context.
    
    This adds a `show_src_lines_frame` configuration option (which defaults
    to `1`) that determines how many source lines get shown for frame operations `up`, `down`, and `set` (frame).
    HeyNonster authored and ko1 committed Jun 4, 2025
    Configuration menu
    Copy the full SHA
    ba7c39d View commit details
    Browse the repository at this point in the history
  2. Fix FrameInfo#block_identifier

    Since ruby 3.4, not all cases match BLOCK_LABL_REGEXP anymore
    This fixes for those cases.
    andrepiske authored and ko1 committed Jun 4, 2025
    Configuration menu
    Copy the full SHA
    69d245a View commit details
    Browse the repository at this point in the history
  3. Normalize formatting, grammar, etc…

    Just that - normalizing various formatting, code blocks, fixing some
    grammar and typos, and the like.
    stevenharman authored and ko1 committed Jun 4, 2025
    Configuration menu
    Copy the full SHA
    a9bbc70 View commit details
    Browse the repository at this point in the history
  4. no_repeat option

    Entering an empty newline repeats the last command, such as `continue`
    or `list`.
    
    This configuration disable this feature.
    
    ruby#1098
    ko1 committed Jun 4, 2025
    Configuration menu
    Copy the full SHA
    fb1cff5 View commit details
    Browse the repository at this point in the history
  5. The debug gem can abort when stepping into a rescue clause:

    ```
    $ ruby -Ilib exe/rdbg rescue-test.rb
    [1, 7] in rescue-test.rb
    =>   1| 1.times do
         2|   begin
         3|     raise
         4|   rescue
         5|     p 1
         6|   end
         7| end
    =>#0    <main> at rescue-test.rb:1
    (rdbg) s    # step command
    [1, 7] in rescue-test.rb
         1| 1.times do
         2|   begin
    =>   3|     raise
         4|   rescue
         5|     p 1
         6|   end
         7| end
    =>#0    block in <main> at rescue-test.rb:3
      ruby#1    Integer#times at <internal:numeric>:257
      # and 1 frames (use `bt' command for all frames)
    (rdbg) s    # step command
    /home/mame/work/debug/lib/debug/thread_client.rb:85:in 'DEBUGGER__::ThreadClient#default_frame_formatter': undefined method '+' for nil (NoMethodError)
    
              "#{colorize_blue("block")}#{args_str} in #{colorize_blue(block_loc + level)}"
                                                                                 ^
            from /home/mame/work/debug/lib/debug/thread_client.rb:755:in 'Method#call'
            from /home/mame/work/debug/lib/debug/thread_client.rb:755:in 'DEBUGGER__::ThreadClient#frame_str'
            from /home/mame/work/debug/lib/debug/thread_client.rb:742:in 'block in DEBUGGER__::ThreadClient#show_frames'
            from <internal:numeric>:257:in 'Integer#times'
            from /home/mame/work/debug/lib/debug/thread_client.rb:739:in 'DEBUGGER__::ThreadClient#show_frames'
            from /home/mame/work/debug/lib/debug/thread_client.rb:304:in 'DEBUGGER__::ThreadClient#suspend'
            from /home/mame/work/debug/lib/debug/thread_client.rb:358:in 'block in DEBUGGER__::ThreadClient#step_tp'
            from rescue-test.rb:5:in 'block in <main>'
            from <internal:numeric>:257:in 'Integer#times'
            from rescue-test.rb:1:in '<main>'
    rescue-test.rb:3:in 'block in <main>': unhandled exception
            from <internal:numeric>:257:in 'Integer#times'
            from rescue-test.rb:1:in '<main>'
    ```
    
    This is because `rb_debug_inspector_backtrace_locations` returned a
    modified backtrace, which skips rescue/ensure frames, but
    `rb_debug_inspector_frame_XXX_get`'s index is considered for a raw
    backtrace, which includes rescue/ensure frames.
    
    The problem wil be fixed by ruby/ruby#13510.
    However, now the backtrace includes rescue/ensure frames, so some tests
    in debug gem fails. This fixes the test failures.
    mame committed Jun 4, 2025
    Configuration menu
    Copy the full SHA
    cf469f2 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2025

  1. update README.md

    ko1 committed Jun 5, 2025
    Configuration menu
    Copy the full SHA
    dbcddaa View commit details
    Browse the repository at this point in the history
  2. Explicitly skip TracePoint events in internal code

    In Ruby 3.5, `Kernel#caller_location` will not include `<internal:xxx>`
    frames. ruby/ruby#13238
    
    To skip the internal frames, explicitly check if `TracePoint#path` is a
    internal path or not.
    mame authored and ko1 committed Jun 5, 2025
    Configuration menu
    Copy the full SHA
    b0ca87e View commit details
    Browse the repository at this point in the history
  3. Fix help message of the eval command

    When running the `eval` command (or its alias, `call`) without an
    argument, you get the following error:
    
    ```
    [REPL ERROR] #<NameError: undefined local variable or method `cmd' for #<DEBUGGER__::Session:0x0000000120a0fa20>>
      debug-1.10.0/lib/debug/session.rb:934:in `block in register_default_command'
      debug-1.10.0/lib/debug/session.rb:1165:in `process_command'
      ...
    ```
    
    ...instead of this hint:
    
    ```
    To evaluate the variable `eval`, use `pp eval` instead.
    ```
    
    I believe the regression was introduced in a402e73.
    
    To fix this issue, I was thinking of passing the command name alongside
    the argument in the `process_line` method but I wasn't sure this was
    worth it just for this hint. So I removed the hint altogether instead.
    matthieuprat authored and ko1 committed Jun 5, 2025
    Configuration menu
    Copy the full SHA
    32f55ff View commit details
    Browse the repository at this point in the history
  4. fix: handle UTF-8 history with empty LANG env

    jsxs0 authored and ko1 committed Jun 5, 2025
    Configuration menu
    Copy the full SHA
    29bb179 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    64c0c72 View commit details
    Browse the repository at this point in the history
  6. Fix load_history method

    jsxs0 authored and ko1 committed Jun 5, 2025
    Configuration menu
    Copy the full SHA
    bd9a813 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2025

  1. Add XDG support for history file (ruby#1031)

    This commit implements XDG directory support for this gem's history file
    in accordance with the rules outlined in ruby#1031:
    
    > For the history file:
    >
    > 1. prefer `~/.rdbg_history` if present,
    > 2. else, `$XDG_DATA_HOME/rdbg/history` if `$XDG_DATA_HOME` is set¹
    >
    > ¹ There'd need to be a check for this file path. If it exists, great!
    > If not, create the path `$XDG_DATA_HOME/rdbg` and touch
    > `$XDG_DATA_HOME/rdbg/history`.
    
    See: ruby#1031 (comment)
    jgarber623 authored and ko1 committed Jun 6, 2025
    Configuration menu
    Copy the full SHA
    630dbfa View commit details
    Browse the repository at this point in the history
  2. Add XDG support for rdbgrc file (ruby#1031)

    This commit implements XDG directory support for this gem's `.rdbgrc`
    configuration file in accordance with the rules outlined in ruby#1031:
    
    > 1. prefer `~/.rdbgrc` if present,
    > 2. else, `$XDG_CONFIG_HOME/rdbg/config` if `$XDG_CONFIG_HOME` is set
    > and `$XDG_CONFIG_HOME/rdbg/config` is present,
    > 3. else, no customized user configuration
    
    See: ruby#1031 (comment)
    jgarber623 authored and ko1 committed Jun 6, 2025
    Configuration menu
    Copy the full SHA
    b63bd2e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f0579e4 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2025

  1. fix hitory file path

    * Set `CONFIG[:history_file]` as nil, and ignore it if it is nil.
    * Respect `CONFIG[:history_file]` even if the path doesn't exists.
    * Respect `~/.rdbg_history` if exists for compatibility.
    * Use `XDG_STATE_HOME` if there is no configuration about history file.
    ko1 committed Jun 13, 2025
    Configuration menu
    Copy the full SHA
    43f80ff View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2025

  1. Self-document the XDG_STATE_HOME fallback

    jasonkarns authored and ko1 committed Jun 17, 2025
    Configuration menu
    Copy the full SHA
    ec0a966 View commit details
    Browse the repository at this point in the history
  2. v1.11.0

    ko1 committed Jun 17, 2025
    Configuration menu
    Copy the full SHA
    a86adbb View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2025

  1. Update imemo_mask to match ruby's

    The imemo mask has been `0xf` since Ruby 2.5 /
    ccfe37884ab566336380d0f21e15321d6382da8f
    
    This hasn't caused problems yet because the only
    possible conflict is `imemo_type = 15`, but it is
    not yet used.
    byroot authored and ko1 committed Jul 15, 2025
    Configuration menu
    Copy the full SHA
    14c8a54 View commit details
    Browse the repository at this point in the history
Loading