summaryrefslogtreecommitdiff
path: root/com32/include/dprintf.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'elflink-pxe-fixes-for-mfleming-2' of ↵Matt Fleming2013-09-301-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://github.com/geneC/syslinux into firmware Pull various network stack fixes from Gene Cumm and adapt to the 6.xx core_udp_* API, * 'elflink-pxe-fixes-for-mfleming-2' of git://github.com/geneC/syslinux: PXE ISR: Force polling on select hardware WORKAROUND core/lwip: Fix NULL pointer check PXE: use ddprintf macro com32: Define ddprintf() macro PXELINUX: specify PXE/lwIP undiif: show thread of execution on UNDIIF_ID_DEBUG core: dprintf() the banner. PXELINUX: Use sendto() instead of connect()/send()/disconnect() core: make mbox_post()/__sem_down_slow() check if valid core: mbox/semaphore NULL checks core/lwip/undi: Improve UNDIIF_ID_DEBUG messages Conflicts: core/fs/pxe/pxe.c core/fs/pxe/tftp.c core/init.c
| * com32: Define ddprintf() macroGene Cumm2013-09-231-0/+3
| | | | | | | | | | | | | | | | Duplicating Debug Printf; Certain warning/error printf() statements are not visible if they occur before ldlinux.c32 is loaded Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | Merge tag 'syslinux-5.11-pre8' into firmwaresyslinux-6.02-pre1Matt Fleming2013-07-081-2/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | syslinux-5.11-pre8 Conflicts: NEWS com32/lib/Makefile core/conio.c mk/devel.mk mk/elf.mk
| * debug.c32: Dynamically enable/disable debug code at runtimeMatt Fleming2013-07-051-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's useful to be able to enable (and disable) debug code at runtime, particularly for allowing users that are unable to build their own Syslinux releases the chance to provide useful debugging output. For example, say a user reports trouble with their PXE stack but doesn't have a development environment setup to turn on the debug code themselves. With this change you can simply request that they do, debug.c32 -e pxe_call unload_pxe open_file to enable the debug in those functions. By only turning on code in specific functions we reduce the chance of disrupting the buggy behaviour and improve the signal to noise ratio for print statements. To disable debug code use the -d flag, debug.c32 -d pxe_call To use this new feature simply do, if (syslinux_debug_enabled) { debug1(); debug2(); .... } from within the function you wish to add debug code. Note that this feature is not limited to print statements - you can put any code within the conditional, such as verifying a checksum or checking for memory leaks. The plan is to leave the dynamic debug code built in for all prereleases and to turn it off for final releases. People may still want to build with all dprintf() statements enabled, and so a new symbol, DYNAMIC_DEBUG, was introduced rather than repurposing the old DEBUG, DEBUG_STDIO and DEBUG_PORT symbols. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | core: Rename DEBUG macro to avoid gnu-efi library conflictChandramouli Narayanan2012-09-041-4/+4
|/ | | | | | | | | Use of DEBUG macro clases with gnu-efi library. This patch defines CORE_DEBUG. Appropriate changes to sources are made as a result. Also, the linker error on __bad_SEG is fixed. Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Only compile dprintf/vdprintf if DEBUG_PORT is definedH. Peter Anvin2012-07-191-0/+4
| | | | | | | | | | | | | We really, really don't want to accidentally spew output to a debug port in production, so make it obligatory to define DEBUG_PORT or DEBUG_STDIO in order for the debugging code to be compiled in. Since DEBUG_STDIO just turns the debugging code into stdio references, we only need to compile the code for the DEBUG_PORT case. Add a commented-out line to mk/devel.mk to make it easier for users. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Matt Fleming <matt.fleming@intel.com>
* dprintf: always define dprintf2/vdprintf2H. Peter Anvin2012-05-181-7/+7
| | | | | | | Always define dprintf2/vdprintf2 even with no debugging at all enabled. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* dprintf: add the ability to log to stdioH. Peter Anvin2012-05-181-3/+17
| | | | | | | | | | | | Add the ability to redirect dprintf to stdio when there is no other choice. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Resolved Conflicts: com32/lib/dprintf.c com32/lib/vdprintf.c
* dprintf: fix uninitialized pointer; return voidH. Peter Anvin2009-11-191-2/+2
| | | | | | | | Fix an uninitialized pointer bug; return void rather than returning int like normal printfs... if we're depending on the return value of a debugging function we're screwed when debugging is disabled. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* dprintf: a generic debug-to-serial infrastructureH. Peter Anvin2009-11-191-0/+22
Actually provide real infrastructure for debug-to-serial. Very useful when debugging fullscreen applications, especially under an emulator like Qemu. Signed-off-by: H. Peter Anvin <hpa@zytor.com>