dirty inbetween work commit

main
Simon 6 months ago
parent e4575605aa
commit 5ae907ca5a

@ -5,7 +5,9 @@ SerialStream::SerialStream(ComPort port, BaudRate baud_rate, DataBits data_bits,
StopBits stop_bits, Parity parity) StopBits stop_bits, Parity parity)
:Serial(port, baud_rate, data_bits, stop_bits, parity) {} :Serial(port, baud_rate, data_bits, stop_bits, parity) {}
void SerialStream::flush() {} void SerialStream::flush() {
print(buffer, strlen(buffer));
}
// https://stackoverflow.com/questions/3440726/what-is-the-proper-way-of-implementing-a-good-itoa-function // https://stackoverflow.com/questions/3440726/what-is-the-proper-way-of-implementing-a-good-itoa-function
// Yet, another good itoa implementation // Yet, another good itoa implementation
@ -76,10 +78,15 @@ void SerialStream::reset() {
} }
void SerialStream::setPos(int x, int y) { void SerialStream::setPos(int x, int y) {
char out[] = {0x1b, '[', 0, 0, ';', 0, 0, 'H', 0}; //char out[] = {0x1b, '[', 0, 0, ';', 0, 0, 'H', 0};
itoa(x, &out[2], 10); *this << 0x1b;
itoa(y, &out[5], 10); *this << '[';
print(out, strlen(out)); *this << dec << x;
*this << ';' << y << 'H' << endl;
flush();
//itoa(x, &out[2], 10);
//itoa(y, &out[5], 10);
//print( out , strlen(out));
} }
void SerialStream::print(char* str, int length) { void SerialStream::print(char* str, int length) {

@ -13,9 +13,7 @@ TextStream::TextStream(unsigned from_col,
void TextStream::flush() { void TextStream::flush() {
for (unsigned i=0; i <= pos; i++) { print(buffer,pos);
print(&buffer[i],1);
}
pos = 0; pos = 0;

@ -59,7 +59,7 @@ kvm: all
# Execute Qemu with activated GDB stub and directly connect GDB to the spawned Qemu. # Execute Qemu with activated GDB stub and directly connect GDB to the spawned Qemu.
gdb: all gdb: all
${VERBOSE} cgdb -d $(GDB) "$(DBGKERNEL)" \ ${VERBOSE} $(GDB) "$(DBGKERNEL)" \
-ex "set arch $(DBGARCH)" \ -ex "set arch $(DBGARCH)" \
-ex "target remote | exec $(QEMU) -gdb stdio $(QEMUKERNEL) -smp $(QEMUCPUS) -S $(QEMUFLAGS) $(DBGFLAGS)" -ex "target remote | exec $(QEMU) -gdb stdio $(QEMUKERNEL) -smp $(QEMUCPUS) -S $(QEMUFLAGS) $(DBGFLAGS)"

Loading…
Cancel
Save