Merge stable to dev (#365)

* Fixes `u` command `module object is not callable` (#310)

pwndbg> u 0x404030
'u': Starting at the specified address, disassemble
    N instructions (default 5).
Traceback (most recent call last):
  File "/home/dc/installed/pwndbg/pwndbg/commands/__init__.py", line 99, in __call__
    return self.function(*args, **kwargs)
  File "/home/dc/installed/pwndbg/pwndbg/commands/__init__.py", line 191, in _OnlyWhenRunning
    return function(*a, **kw)
  File "/home/dc/installed/pwndbg/pwndbg/commands/windbg.py", line 292, in u
    pwndbg.commands.nearpc(where, n)
TypeError: 'module' object is not callable

* Fix malloc chunk names (#318)

* heap: respect rename of malloc_chunk fields

newer glibc uses different names for the fields of malloc_chunk

* move value_from_type to typeinfo and rename to read_gdbvalue

* add comment about renaming of `[prev_]size`

* Workaround for gdb remote target search bug described in #321 (#322)

* Fixes issue when we try to display context while selected thread is running #299 (#331)

* Fix tag_release (#348)

* Fix "dt" offsets which are sometimes floating-point (#355)

* Fixes #362 - broken entry command (#363)
This commit is contained in:
Disconnect3d 2017-11-30 01:43:21 +01:00 committed by Zach Riggle
parent 3ac1047b32
commit 466ab2cc2b
4 changed files with 10 additions and 4 deletions

View File

@ -9,6 +9,8 @@ from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import shlex
import gdb
import pwndbg.commands
@ -66,5 +68,5 @@ def entry(*a):
"""
global break_on_first_instruction
break_on_first_instruction = True
run = 'run ' + ' '.join(a)
run = 'run ' + ' '.join(map(shlex.quote, a))
gdb.execute(run, from_tty=False)

View File

@ -112,7 +112,8 @@ def dt(name='', addr=None, obj = None):
for name, field in t.items():
# Offset into the parent structure
o = getattr(field, 'bitpos', 0)/8
o = getattr(field, 'bitpos', 0) // 8
b = getattr(field, 'bitpos', 0) % 8
extra = str(field.type)
ftype = field.type.strip_typedefs()
@ -137,7 +138,9 @@ def dt(name='', addr=None, obj = None):
else: extra_lines.append(35*' ' + line)
extra = '\n'.join(extra_lines)
line = " +0x%04x %-20s : %s" % (o, name, extra)
bitpos = '' if not b else ('.%i' % b)
line = " +0x%04x%s %-20s : %s" % (o, bitpos, name, extra)
rv.append(line)
return ('\n'.join(rv))

View File

@ -33,4 +33,5 @@ def prompt_hook_on_stop(*a):
pwndbg.commands.context.context()
gdb.prompt_hook = prompt_hook

View File

@ -8,7 +8,7 @@ git fetch --all
TAG=$($DATE '+%Y.%m.%d')
if git tag -a $TAG -m "Add release $TAG" origin/master; then
if git tag -a $TAG -m "Add release $TAG" origin/stable; then
git push origin $TAG
fi