Skip to content

Setting breakpoints on module!symbol does not work #122

Open

Description

I believe I've run into a bug, where setting the breakpoint on the name, rather than its address fails.

It is possible to resolve the symbol (export), but using bp or Set-BreakPoint does not work.

Image

I've also attempt to use the .Address property of Get-DbgSymbol and attempted a pipe, but these also fail currently.

Image

Activity

  1. jazzdelightsme commented on Feb 19, 2025

    @jazzdelightsme
    Member

    Thanks for the report, Frank Spierings (@FrankSpierings)! I am able to repro.

    This seems to be happening due to the constraint here, where SetDbgBreakpointCommand is trying to restrict the symbol enumeration to things tagged as functions.

    However, manual experimentation shows that the symbol found for that expression is tagged as a "PublicSymbol"... so it doesn't match.

    PS Dbg:\notepad (0)\Threads\0
    > $s = $Debugger.FindSymbol_Enum( 'kernel32!CreateFileW' )
    PS Dbg:\notepad (0)\Threads\0
    > $s.DSE
    
    ModuleBase : (null)
    Address    : 00007ffc`addc6e50
    Id         : 0xe3
    Size       : 0x10
    TypeId     : 0x0
    Token      : 0
    Arg64      : 0x0
    Arg32      : 0x0
    Tag        : PublicSymbol   <-----
    

    Off the top of my head, I don't know if this worked well before or not. But there is a telling comment in the code here.

    (This project has been on the way back burner for a while; not sure when I will have time to look at this more in depth. But I really appreciate the report.)

  2. FrankSpierings commented on Feb 19, 2025

    @FrankSpierings
    Author

    Dan Thompson (@jazzdelightsme) The documentation states that it should work, but looking at the git Blame function that might have been 8 years ago (?!).
    I might have a look if I have some time today. I think this could be a really useful tool for automating certain debugging tasks. I'm not sure how the rest of the world can stick with the windbg (scripting) interface. It seems so behind gdb + gef for instance. I really like the fact that you can execute any PowerShell or debugging command when hitting a breakpoint for instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions