Skip to content

Commit

Permalink
escape brackets in disassembly (fixes cs01#81); gracefully hide nonex…
Browse files Browse the repository at this point in the history
…istent opcodes
  • Loading branch information
cs01 committed Jun 21, 2017
1 parent 5b27c76 commit 4b50ee6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gdbgui/static/js/gdbgui.js
Original file line number Diff line number Diff line change
Expand Up @@ -940,10 +940,11 @@ const SourceCode = {
for(let i of instructions_for_this_line){
let cls = (addr === i.address) ? 'current_assembly_command assembly' : 'assembly'
, addr_link = Memory.make_addrs_into_links(i.address)
, instruction = Memory.make_addrs_into_links(i.inst)
, instruction = Memory.make_addrs_into_links(Util.escape(i.inst))
, opcodes = i.opcodes ? `(${i.opcodes})` : ''
instruction_content.push(`
<span style="white-space: nowrap;" class='${cls}' data-addr=${i.address}>
${instruction}(${i.opcodes}) ${i['func-name']}+${i['offset']} ${addr_link}
${instruction}${opcodes} ${i['func-name']}+${i['offset']} ${addr_link}
</span>`)
// i.e. mov $0x400684,%edi(00) main+8 0x0000000000400585
}
Expand Down

0 comments on commit 4b50ee6

Please sign in to comment.