27 Commits

Author SHA1 Message Date
Bart Van Assche
8e96150945 Merged FORMATCHECK branch (r8368) to trunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369
2008-07-07 06:49:24 +00:00
Julian Seward
5679a22410 Update copyright dates ("200X-2007" --> "200X-2008").
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398
2008-02-11 11:34:59 +00:00
Julian Seward
be97b31c6c Make VG_(printf) et al conform to ANSI w.r.t. capitalisation of
hex numbers: %x produces lowercase hex, and %X produces uppercase.
Unfortunately this probably changes the output in dozens of places.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6596
2007-02-16 14:10:24 +00:00
Julian Seward
172505c978 Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488
2007-01-08 06:01:59 +00:00
Julian Seward
2040c9cd05 Syscall tidying.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6349
2006-11-10 22:47:27 +00:00
Julian Seward
8df1c897ec Merge r6150 and 6151:
- track SysRes changes
- add AIX support


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6283
2006-10-17 01:53:34 +00:00
Julian Seward
ad67fd79fe Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954
2006-06-05 23:21:15 +00:00
Julian Seward
163ce737c9 Replace the obviously-bogus piece of inline asm with a probably
equally bogus new version.  In fact if I actually understood the
magical "earlyclobber" (&) asm constraint this would probably be
unnecessary, but I don't.  Ah well.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5935
2006-05-26 11:31:15 +00:00
Julian Seward
9424d27ceb Rewrite inline asm for ppc32/64-linux to make them gcc-4.1.0 proof.
Thanks to David Woodhouse for pointing me in the right direction.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5921
2006-05-22 13:04:42 +00:00
Julian Seward
ed4db0bbc5 Fix completely bogus asm, which didn't work when compiled with gcc-4.1.0
since it trashed the regs that gcc assigned for %0 and %1 before reading
them.  local_sys_write_stderr() for the 3 other targets suffer from the
same problem.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5865
2006-04-28 21:01:33 +00:00
Julian Seward
8ba9a34088 Add framework for ppc64 support. Apologies in advance for the
inevitable breakage to other platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5250
2005-11-29 13:05:56 +00:00
Julian Seward
cc8ccbbfb4 This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive).  That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome.  The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
  and include it in a couple of places.  Building etc seems to still
  work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
  stuff was moved from -generic to -linux after the branch was created.
  I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
  is strange, and makes it hard to diagnose regtest failures.  In
  particular memcheck/tests/x86/scalar.stderr.exp remains in a 
  conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable.  I'll
  attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789
2005-09-27 19:20:21 +00:00
Nicholas Nethercote
ccad5e3600 Change slightly the way integers are printed by printf() and friends.
Previously, %d printed a 32-bit int.  %ld and %lld printed 64-bit ints.
So if you wanted to print a word-sized int (eg. a SizeT variable), you
had to cast it to a Long and then print with %lld in order to work on
both 32-bit and 64-bit platforms.

I changed things so that %d prints a 32-bit int, %ld prints a word-sized
int, and %lld prints a 64-bit int.  There are two advantages to this:
- it now matches the way the normal glibc printf() works;
- you can print word-sized ints without casting.

I also made the corresponding change for %u/lu/llu and %x/lx/llx, and I
changed a couple of VG_(printf)() invocations accordingly.





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4527
2005-08-26 19:42:27 +00:00
Julian Seward
7bd64eb411 New printf format specifier %t, which is like %s but escapes
XML-unfriendly chars and thereby helps in the construction of valid
XML output.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4185
2005-07-19 14:17:37 +00:00
Cerion Armour-Brown
d5f7c8aed3 Finally, valgrind on ppc32.
Plenty still to do, but simple programs like ls seem to run ok

Thanks, Paul, for having your ppc port of valgrind 2.4 to work from!




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3969
2005-06-20 15:51:07 +00:00
Nicholas Nethercote
f174930b23 Final commit for the initial modularisation pass:
- Broke part of m_scheduler off into a new module m_threadstate.  It
  contains ThreadState, VG_(threads)[] and some basic operations on the
  thread table.  All simple stuff, the complex stuff stays in m_scheduler.
  This avoids lots of circular dependencies between m_scheduler and other
  modules.

- Managed to finally remove core.h and tool.h, double hurrah!

- Introduced pub_tool_basics.h and pub_core_basics.h, one of which is
  include by every single C file.

- Lots of little cleanups and changes related to the above.

- I even did a small amount of documentation updating.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3944
2005-06-19 01:24:32 +00:00
Julian Seward
d614e0a16f debug-logging (-d) totally didn't work when one Valgrindified process
exec's another.  This commit fixes it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3818
2005-05-30 23:52:47 +00:00
Nicholas Nethercote
92c61a5fd1 Don't mix backticks and apostrophes when quoting words -- eg. use 'foo'
rather than `foo', as www.cl.cam.ac.uk/~mgk25/ucs/quotes.html explains
we should (in more detail than you'd imagine was possible).  I did this
both in output messages and in some comments, for consistency.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3723
2005-05-15 17:28:26 +00:00
Julian Seward
1ab9dd1d31 Initial cleanups based on target-specific defines.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3592
2005-05-02 10:33:44 +00:00
Julian Seward
efbfebe72e Even more pissing with inline asm around to placate gcc-3.4 -fpic. We
can't trash %ebx without gcc getting unhappy, so trash %edi instead.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3579
2005-04-28 09:40:53 +00:00
Julian Seward
e55e18c4ba local_sys_write_stderr: tell gcc what registers the asm trashes.
Otherwise it doesn't save %ebx across the routine, which is fatal as
%ebx is a callee-save register, it seems.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3578
2005-04-27 23:17:48 +00:00
Tom Hughes
9767dcb99f Make the debug log module work on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3575
2005-04-27 09:23:02 +00:00
Tom Hughes
dd35e4a4cb Rework the inline assembly implementations of write and getpid for x86 to
work in PIE builds.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3574
2005-04-27 08:58:53 +00:00
Julian Seward
c862370c01 amd64 build fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3567
2005-04-25 16:21:17 +00:00
Julian Seward
a16787b1b5 More printing fine-tuning
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3562
2005-04-25 02:37:56 +00:00
Julian Seward
920e4c17ad Print a bit more prettily.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3560
2005-04-25 02:04:54 +00:00
Julian Seward
487756039c Add a new module: the debug-logger. For a while now, we've used the
same logging mechanism to emit both end-user messages and debugging-
valgrind-itself messages.  This commit creates a new mechanism for the
latter purpose.

The main feature of m_debuglog is that it has zero dependencies on any
other module and therefore can safely operate all the way through
stage1 and stage2 startup.  It is restricted to emitting debug info on
file descriptor 2 (stderr), but that's not a big deal.

As a result of this change the basic formatted-print routines
(vprintf) have been moved from vg_mylibc.c into m_debuglog, so that
m_debuglog remains standalone.

The %y format string is currently disabled, since supporting it ("show
symbol corresponding to this address") would create a dependency from
m_debuglog to the entire debug-info reading machinery and all the
stuff that depends on, thereby making a nonsense of m_debuglog being
standalone.  Its omission does not seem to cause any regression tests
to fail, though.

The debug logger is activated with "-d".  More "-d"s make it more
verbose.

m_debuglog.o is linked into both stage1 and stage2, but as it is
completely standalone this causes no particular problems.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3559
2005-04-25 01:36:56 +00:00