Run 'black' on gdb
Running 'black' on gdb fixed a couple of small issues. This patch is the result.
This commit is contained in:
parent
9afca381e2
commit
bf4d777d39
2 changed files with 8 additions and 5 deletions
|
@ -30,7 +30,8 @@ from _gdb import *
|
||||||
# Historically, gdb.events was always available, so ensure it's
|
# Historically, gdb.events was always available, so ensure it's
|
||||||
# still available without an explicit import.
|
# still available without an explicit import.
|
||||||
import _gdbevents as events
|
import _gdbevents as events
|
||||||
sys.modules['gdb.events'] = events
|
|
||||||
|
sys.modules["gdb.events"] = events
|
||||||
|
|
||||||
|
|
||||||
class _GdbFile(object):
|
class _GdbFile(object):
|
||||||
|
@ -243,9 +244,9 @@ def set_parameter(name, value):
|
||||||
# can return them, but they can't be passed to 'set' this way.
|
# can return them, but they can't be passed to 'set' this way.
|
||||||
if isinstance(value, bool):
|
if isinstance(value, bool):
|
||||||
if value:
|
if value:
|
||||||
value = 'on'
|
value = "on"
|
||||||
else:
|
else:
|
||||||
value = 'off'
|
value = "off"
|
||||||
execute("set " + name + " " + str(value), to_string=True)
|
execute("set " + name + " " + str(value), to_string=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -114,10 +114,12 @@ def check_global_var(expected_val):
|
||||||
if val != expected_val:
|
if val != expected_val:
|
||||||
raise gdb.GdbError("global_var is 0x%x, expected 0x%x" % (val, expected_val))
|
raise gdb.GdbError("global_var is 0x%x, expected 0x%x" % (val, expected_val))
|
||||||
|
|
||||||
|
|
||||||
# Return a bytes object representing an 'X' packet header with
|
# Return a bytes object representing an 'X' packet header with
|
||||||
# address ADDR.
|
# address ADDR.
|
||||||
def xpacket_header (addr):
|
def xpacket_header(addr):
|
||||||
return ("X%x,4:" % addr).encode('ascii')
|
return ("X%x,4:" % addr).encode("ascii")
|
||||||
|
|
||||||
|
|
||||||
# Set the 'X' packet to the remote target to set a global variable.
|
# Set the 'X' packet to the remote target to set a global variable.
|
||||||
# Checks that we can send byte values.
|
# Checks that we can send byte values.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue