Commit graph

20 commits

Author SHA1 Message Date
Solomon Peachy
835d0c737a logf: Fix two issues with logf_panic_dump()
* It had a (read) buffer overflow when dumping the stuff on the back half of the buffer
 * a highly questionable code construct was nuked

Change-Id: I7f6f119524fc2095f788fc9b3d356459955d3ace
2021-08-06 10:08:00 -04:00
Mihail Zenkov
e599810ffa Don't add new message to logf when we dump it to file
Fix log file corruption if we have new messages at dumping log to file. Comment
removed as it incorrect. We store all messages in direct order (last message at
end of file).

Change-Id: I4acfa8a0935cc41a889e08f6bc42974fefd1ade2
2016-04-04 11:07:44 +02:00
Frank Gevaerts
25e50ed8f1 Print `last logf lines on panic().
If logf is enabled, panic() will print the last lines. On small
screens this is more or less useless, but on large screens it
can be very useful for debugging.

Change-Id: I26dfc76e9ac4a2ddc2def8db1616a04f943dbba3
Reviewed-on: http://gerrit.rockbox.org/709
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
Tested: Frank Gevaerts <frank@gevaerts.be>
2014-01-11 11:37:18 +01:00
Rafaël Carré
a72aa856bd Move some gcc extensions to new gcc_extensions.h header
- Move ATTRIBUTE_PRINTF/ATTRIBUTE_SCANF from _ansi.h
  They are not related at all to this file, and this broke compilation
  with Code Sourcery GCC which ships its own _ansi.h
- Move LIKELY/UNLIKELY from system.h

There is likely a lot more GCC extensions used everywhere in the source,
conditionally on __GNUC__ or unconditionally

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27548 a1c6a512-1295-4272-9138-f99709370657
2010-07-25 14:44:29 +00:00
Rafaël Carré
147447a284 don't let logf() and DEBUGF() be empty statements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26146 a1c6a512-1295-4272-9138-f99709370657
2010-05-18 18:32:21 +00:00
Maurus Cuelenaere
20b0dd2788 A new implementation of logf, logfdisplay and logfdump.
Flyspray: FS#10528
Author: Amaury Pouly


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22462 a1c6a512-1295-4272-9138-f99709370657
2009-08-21 22:54:23 +00:00
Maurus Cuelenaere
4c793febc8 Commit FS#9733 (multiline logf) by Yoshihisa Uchida
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19625 a1c6a512-1295-4272-9138-f99709370657
2008-12-31 17:01:00 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Nicolas Pennequin
fb70952228 logf changes:
* Disable logf by default and allow per-file enabling with "#define LOGF_ENABLE". To enable globally add that define in the config.h file.
* Transform logf calls into DEBUGF calls when ROCKBOX_HAS_LOGF isn't defined, so that they get printed to the console in the sim.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15291 a1c6a512-1295-4272-9138-f99709370657
2007-10-24 22:06:36 +00:00
Jens Arnold
f68362ad6f Fix simulator builds, and some debugf() format strings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12817 a1c6a512-1295-4272-9138-f99709370657
2007-03-17 09:54:28 +00:00
Miika Pekkarinen
75e1fd718f Fixed the logf builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12816 a1c6a512-1295-4272-9138-f99709370657
2007-03-17 09:38:25 +00:00
Jens Arnold
79c8a8cbbe Let GCC check arguments of some more printf-style functions, also for plugins and codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12815 a1c6a512-1295-4272-9138-f99709370657
2007-03-17 09:02:53 +00:00
Miika Pekkarinen
0dd7ea2d71 Support building tagcache db natively on PC using the core of the
Rockbox tagcache database engine. Only host endian support at the
moment and no command line parameters. Mainly for developers for
debugging at the moment.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11497 a1c6a512-1295-4272-9138-f99709370657
2006-11-10 08:03:33 +00:00
Michiel Van Der Kolk
8764bbc275 decrease to 30
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6950 a1c6a512-1295-4272-9138-f99709370657
2005-06-30 15:33:43 +00:00
Michiel Van Der Kolk
25b55e16bc better logf
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6949 a1c6a512-1295-4272-9138-f99709370657
2005-06-30 15:14:33 +00:00
Tomas Salfischberger
2c7a1735c0 My gcc v3.3.5 choked on the bool type, solved with this include.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6807 a1c6a512-1295-4272-9138-f99709370657
2005-06-22 14:46:38 +00:00
Daniel Stenberg
6ebdbe8df3 Modified logf to use a define for the log width, and changed it to default to
21 as that is what fits in an iriver LCD by default since the font is 6 pixels
wide.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6547 a1c6a512-1295-4272-9138-f99709370657
2005-06-01 13:21:20 +00:00
Daniel Stenberg
edc07922eb (Optional) logf support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6538 a1c6a512-1295-4272-9138-f99709370657
2005-05-30 13:00:43 +00:00
Daniel Stenberg
999f6b5b4a update to the new logf style and moved the defines here too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6521 a1c6a512-1295-4272-9138-f99709370657
2005-05-24 14:27:17 +00:00
Daniel Stenberg
b033f6cf4e initial logf() work, not added to SOURCES yet (on purpose)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6514 a1c6a512-1295-4272-9138-f99709370657
2005-05-23 22:47:42 +00:00