Menu

#337 Parsing strings with spaces in debugger

v1.2
closed-fixed
5
2016-06-03
2016-04-26
No

The parser recognise:

break Speccyboot:0:0x1234

but not:

break Didaktik 80 RAM:0:0x1234

If the parser cannot recognise strings with delimiters, maybe we should accept underscores (e.g., Didaktik_80_RAM) and translate before searching the memory source.

Related

Bugs: #352
Wiki: Fuse 1.2 Release Plan

Discussion

  • Sergio Baldoví

    Sergio Baldoví - 2016-05-20
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,6 +4,6 @@
    
     but not:
    
    -   break Didaktik RAM:0:0x1234
    +   break Didaktik 80 RAM:0:0x1234
    
    -If the parser cannot recognise strings with delimiters, maybe we should accept underscores (e.g., Didaktik_RAM) and translate before searching the memory source.
    +If the parser cannot recognise strings with delimiters, maybe we should accept underscores (e.g., Didaktik_80_RAM) and translate before searching the memory source.
    
    • Group: future --> v1.2
     
  • Sergio Baldoví

    Sergio Baldoví - 2016-05-20

    Patches attached that allow the use of underscores:

    break Didaktik_80_ROM:0:0x1234
    

    or quoted strings:

    break "Didaktik 80 ROM":0:0x1234
    

    I slightly prefer quotes, it seems more usual. Opinions?

     
  • Fredrick Meunier

    I don't think we have an ideal solution, but I think that both of these options are an improvement over what we have and I'd be happy with either of them from my point of view.

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-05-22

    Another option (patch attached) is don't use spaces. Two arrays are kept, one with spaces for presentation and other without spaces for lookup.

    break Didaktik80ROM:0:0x1234
    

    Another unexplored option is escaped spaces:

    break Didaktik\ 80\ ROM:0:0x1234
    

    Quotes and escape characters are usually used in shells.

     

    Last edit: Sergio Baldoví 2016-05-22
  • Fredrick Meunier

    Personally, I'd be happy with any of these options though I think that escaped is the best one for my preferences.

    Does anyone else have an opinion?

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-05-22

    The attached patch implements the escape method:

    break Didaktik\ 80\ ROM:0:0x1234
    

    Maybe there is a better way of un-escaping spaces using lexical rules, but I think it is good enough. I'll commit this week barring objections.

     
  • Sergio Baldoví

    Sergio Baldoví - 2016-05-25
    • labels: --> debugger, breakpoints
    • status: open --> pending-fixed
    • assigned_to: Sergio Baldoví
     
  • Sergio Baldoví

    Sergio Baldoví - 2016-05-25

    Committed in [r5530].

     

    Related

    Commit: [r5530]

  • Sergio Baldoví

    Sergio Baldoví - 2016-06-03
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.