[hatari-devel] Debugger Question
Eero Tamminen
eerot at users.berlios.de
Mon Jan 11 23:57:52 CET 2010
Hi,
On Tuesday 12 January 2010, Laurent Sallafranque wrote:
> I've uploaded 2 disasm_functions :
>
> Crossbar_disasmRegisters()
> Videl_disasmRegisters()
>
> I've added the prototypes as extern in the respective .h files
> Is it OK for you ?
As these functions just access specific memory addresses and don't really
depend on the other Videl or Crossbar code, I think it would be nicer to
have them directly in debug/info.c (along with anything else you think
useful). That way e.g. the automated debugger test code (in tests/ dir)
doesn't need to link stuff that rest of videl.o or crossbar.o depend on.
- Eero
PS. I personally prefer "early exit" coding style:
if (ConfigureParams.System.nMachineType != MACHINE_FALCON) {
fprintf(stderr, "No Videl\n");
return;
}
/* actual functionality */
Instead of nested ifs, but that doesn't really matter. :-)
More information about the hatari-devel
mailing list