would like a opcodes logger command... like one in mame debugger, can shorten a loop.
i was having hard time using bosch, because of limited debugger commands.
Peter-bochs A better bochs for os developer
Re: Peter-bochs A better bochs for os developer
hi, may I know what is opcode logger? Is that mean you want to display the instruction start from current eip?
If possible, please give me a screendump of name debugger opcode logger, I can't find it.
thanks
If possible, please give me a screendump of name debugger opcode logger, I can't find it.
thanks
Re: Peter-bochs A better bochs for os developer
Added a history panel on the bottom. you can compare the value of registers of each break.
Re: Peter-bochs A better bochs for os developer
Hi, today I tried to merge your patch to Bochs tree ... with no success.
1. It even doesn't compile.
+ void bx_dbg_search_memory_command(bx_address from, bx_address length, bx_address value) {
+ Bit8u tempBuffer[length];
there is no such way of allocating variable length buffer in C++ - it is not Java
Also I doubt if anybody interested in looking for number in memory.
2. bx_dbg_gdt_command is perfect copy-paste of existsing "info gdt" command bx_dbg_info_gdt_command. Don't see any reason of adding it.
3. Please rename your 'super breakpoint' to register breakpoint and write some sort of usage docs for this new feature.
4. I am agains copy-paste switches like:
+ switch(reg) {
+ case 0:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EAX);
+ break;
+ case 1:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_ECX);
+ break;
+ case 2:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EDX);
+ break;
+ case 3:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EBX);
+ break;
+ case 4:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_ESP);
+ break;
+ case 5:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EBP);
+ break;
+ case 6:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_ESI);
+ break;
+ case 7:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EDI);
+ break;
+ }
especially when you already have
typedef enum {
BX_DBG_REG32_EAX,
BX_DBG_REG32_ECX,
BX_DBG_REG32_EDX,
BX_DBG_REG32_EBX,
BX_DBG_REG32_ESP,
BX_DBG_REG32_EBP,
BX_DBG_REG32_ESI,
BX_DBG_REG32_EDI,
BX_DBG_REG32_R8,
BX_DBG_REG32_R9,
BX_DBG_REG32_R10,
BX_DBG_REG32_R11,
BX_DBG_REG32_R12,
BX_DBG_REG32_R13,
BX_DBG_REG32_R14,
BX_DBG_REG32_R15
} Regs32;
defined in debug.h.
You could see that your switch could be replaced by single line
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(reg);
The same in other places.
5. Please do not include automatically generated files (lexer.c, parser.c and parser.h) in your patch !!!
6. Please do not mix between 'range watchpoints' and 'register breakpoints' in one 'super breakpoints' name. They are not the same. In fact 'range watchpoints' should be extension of existing now 'watchpoints' but I can't do it now - GUI debugger is too dirty and uses watchpoints in dirty way which must be cleaned up first.
I hope you could prepare better cleaner patch.
Thanks,
Stanislav
1. It even doesn't compile.
+ void bx_dbg_search_memory_command(bx_address from, bx_address length, bx_address value) {
+ Bit8u tempBuffer[length];
there is no such way of allocating variable length buffer in C++ - it is not Java
Also I doubt if anybody interested in looking for number in memory.
2. bx_dbg_gdt_command is perfect copy-paste of existsing "info gdt" command bx_dbg_info_gdt_command. Don't see any reason of adding it.
3. Please rename your 'super breakpoint' to register breakpoint and write some sort of usage docs for this new feature.
4. I am agains copy-paste switches like:
+ switch(reg) {
+ case 0:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EAX);
+ break;
+ case 1:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_ECX);
+ break;
+ case 2:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EDX);
+ break;
+ case 3:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EBX);
+ break;
+ case 4:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_ESP);
+ break;
+ case 5:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EBP);
+ break;
+ case 6:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_ESI);
+ break;
+ case 7:
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(BX_32BIT_REG_EDI);
+ break;
+ }
especially when you already have
typedef enum {
BX_DBG_REG32_EAX,
BX_DBG_REG32_ECX,
BX_DBG_REG32_EDX,
BX_DBG_REG32_EBX,
BX_DBG_REG32_ESP,
BX_DBG_REG32_EBP,
BX_DBG_REG32_ESI,
BX_DBG_REG32_EDI,
BX_DBG_REG32_R8,
BX_DBG_REG32_R9,
BX_DBG_REG32_R10,
BX_DBG_REG32_R11,
BX_DBG_REG32_R12,
BX_DBG_REG32_R13,
BX_DBG_REG32_R14,
BX_DBG_REG32_R15
} Regs32;
defined in debug.h.
You could see that your switch could be replaced by single line
+ reg_val = BX_CPU(dbg_cpu)->get_reg32(reg);
The same in other places.
5. Please do not include automatically generated files (lexer.c, parser.c and parser.h) in your patch !!!
6. Please do not mix between 'range watchpoints' and 'register breakpoints' in one 'super breakpoints' name. They are not the same. In fact 'range watchpoints' should be extension of existing now 'watchpoints' but I can't do it now - GUI debugger is too dirty and uses watchpoints in dirty way which must be cleaned up first.
I hope you could prepare better cleaner patch.
Thanks,
Stanislav
Re: Peter-bochs A better bochs for os developer
thanks
I correct it and submit it later. thanks for your effort
I correct it and submit it later. thanks for your effort
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: Peter-bochs A better bochs for os developer
Bochs DOES support plugins!
Re: Peter-bochs A better bochs for os developer
hi owen, where i can find the plugin development guide?
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: Peter-bochs A better bochs for os developer
I don't know - I've only used Bochs, never coded for it - but it uses plugins to, for example, select it's UI.