mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
utilities: Handle dumping packets in GDB TUI.
Currently, ovs_dump_packets will break the formatting of the GDB terminal UI, resulting in artifacts displayed on the screen that may make packets difficult to read. This patch suppresses stderr output from tcpdump and feeds tcpdumps stdout into the paginated output stream. Signed-off-by: Mike Pattrick <mkp@redhat.com> Acked-by: Paolo Valerio <pvalerio@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
dd4d8e34ba
commit
b3bbfc1729
@@ -1391,7 +1391,8 @@ class CmdDumpPackets(gdb.Command):
|
||||
print("Error, unsupported argument type: {}".format(str(val.type)))
|
||||
return
|
||||
|
||||
tcpdump(pkt_list, args=tcpdump_args)
|
||||
stdout = tcpdump(pkt_list, args=tcpdump_args, getfd=True, quiet=True)
|
||||
gdb.write(stdout.read().decode("utf8", "replace"))
|
||||
|
||||
def extract_pkt(self, pkt):
|
||||
pkt_fields = pkt.type.keys()
|
||||
|
Reference in New Issue
Block a user