Skip to content

Commit f7a044e

Browse files
committed
Unvirtualize gdb_packet
1 parent 3f8b603 commit f7a044e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

gdb-packet.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
enum class gdb_packet_type
77
{
8+
invalid,
89
ack,
910
nak,
1011
brk,
@@ -22,9 +23,9 @@ class gdb_packet
2223
complete
2324
};
2425

25-
virtual ~gdb_packet();
26+
~gdb_packet();
2627

27-
virtual gdb_packet_type type() const noexcept
28+
gdb_packet_type type() const noexcept
2829
{
2930
if (m_data.size()) {
3031
switch (m_data[0]) {
@@ -38,7 +39,7 @@ class gdb_packet
3839
return gdb_packet_type::brk;
3940
}
4041
}
41-
return gdb_packet_type::generic;
42+
return gdb_packet_type::invalid;
4243
}
4344

4445
bool is_complete() const noexcept
@@ -76,9 +77,8 @@ class gdb_packet
7677
return m_state;
7778
}
7879

79-
size_t push_back(const char *data, size_t size)
80+
size_t parse(const char *data, size_t size)
8081
{
81-
//m_data.push_back(data, size);
8282
if (m_data.capacity() < m_data.size() + size) {
8383
m_data.reserve(m_data.size() + size);
8484
}

0 commit comments

Comments
 (0)