|
From: Nicholas N. <nj...@ca...> - 2004-07-30 21:46:52
|
Hi, Continuing the discussions about headers and multiple architectures... for getting the kernel headers at least, I'm imagining a setup like this: Valgrind Linux -------- ----- include/vki_linux.h include/linux/*.h include/vki_asm-generic.h include/asm-generic/*.h include/vki_asm-x86_64.h include/asm-x86_64/*.h include/vki_asm-i386.h include/asm-i386/*.h Here each Valgrind .h file (on the left) represents an entire Linux-source directory (on the right). Because we only use a small fraction of the declarations in the Linux files, it makes sense to compress an entire directory of Linux .h files into a single Valgrind .h file. This setup would work for multiple archs with Linux, but doesn't consider other OSes. I guess Valgrind could use include-linux/, include-freebsd/, etc, or something similar. This is specific to the headers, where it makes great sense to mirror the Linux header structure as closely as possible. The arch- and OS-specific code in Valgrind would be structured differently, possible with arch/, OS/ and arch-OS/ directories under arch/. N |
|
From: Doug R. <df...@nl...> - 2004-08-01 15:49:47
|
On Friday 30 July 2004 22:46, Nicholas Nethercote wrote: > Hi, > > Continuing the discussions about headers and multiple > architectures... for getting the kernel headers at least, I'm > imagining a setup like this: > > Valgrind Linux > -------- ----- > include/vki_linux.h include/linux/*.h > include/vki_asm-generic.h include/asm-generic/*.h > include/vki_asm-x86_64.h include/asm-x86_64/*.h > include/vki_asm-i386.h include/asm-i386/*.h > > Here each Valgrind .h file (on the left) represents an entire > Linux-source directory (on the right). Because we only use a small > fraction of the declarations in the Linux files, it makes sense to > compress an entire directory of Linux .h files into a single Valgrind > .h file. > > This setup would work for multiple archs with Linux, but doesn't > consider other OSes. I guess Valgrind could use include-linux/, > include-freebsd/, etc, or something similar. > > This is specific to the headers, where it makes great sense to mirror > the Linux header structure as closely as possible. The arch- and > OS-specific code in Valgrind would be structured differently, > possible with arch/, OS/ and arch-OS/ directories under arch/. For FreeBSD, I would really prefer to use the system headers directly. We don't have the same problems as Linux wrt. libc redefining headers. Since the same people maintain libc and kernel, there is never an opportunity to get out of sync. |
|
From: Nicholas N. <nj...@ca...> - 2004-08-01 23:31:33
|
On Sun, 1 Aug 2004, Doug Rabson wrote: >> Valgrind Linux >> -------- ----- >> include/vki_linux.h include/linux/*.h >> include/vki_asm-generic.h include/asm-generic/*.h >> include/vki_asm-x86_64.h include/asm-x86_64/*.h >> include/vki_asm-i386.h include/asm-i386/*.h > > For FreeBSD, I would really prefer to use the system headers directly. > We don't have the same problems as Linux wrt. libc redefining headers. > Since the same people maintain libc and kernel, there is never an > opportunity to get out of sync. That's good; one less thing to get wrong. I realised my above-mentioned dir/*.h --> vki_dir.h scheme won't work, because the dependencies between the various .h files under Linux are complex enough that you can't reduce a directory's worth of .h files into a single one. I'm contemplating using as many of the kernel headers as necessary, keeping them separate, but only copying the used parts. That way, with the current usage, there would be about 45 .h files, each one typically very short with only one or two vki_/VKI_ types or constants used. That's kind of sucky, but I can't think of anything better. N |
|
From: Doug R. <df...@nl...> - 2004-08-02 08:47:26
|
On Monday 02 August 2004 00:31, Nicholas Nethercote wrote: > On Sun, 1 Aug 2004, Doug Rabson wrote: > >> Valgrind Linux > >> -------- ----- > >> include/vki_linux.h include/linux/*.h > >> include/vki_asm-generic.h include/asm-generic/*.h > >> include/vki_asm-x86_64.h include/asm-x86_64/*.h > >> include/vki_asm-i386.h include/asm-i386/*.h > > > > For FreeBSD, I would really prefer to use the system headers > > directly. We don't have the same problems as Linux wrt. libc > > redefining headers. Since the same people maintain libc and kernel, > > there is never an opportunity to get out of sync. > > That's good; one less thing to get wrong. > > I realised my above-mentioned dir/*.h --> vki_dir.h scheme won't > work, because the dependencies between the various .h files under > Linux are complex enough that you can't reduce a directory's worth of > .h files into a single one. > > I'm contemplating using as many of the kernel headers as necessary, > keeping them separate, but only copying the used parts. That way, > with the current usage, there would be about 45 .h files, each one > typically very short with only one or two vki_/VKI_ types or > constants used. That's kind of sucky, but I can't think of anything > better. If you are re-organising things, would it be possible to do whatever is necessary to facilitate merging in all the FreeBSD bits? I would quite like to get all that stuff into the mainline sources at some point. |
|
From: Nicholas N. <nj...@ca...> - 2004-08-03 09:34:26
|
On Mon, 2 Aug 2004, Doug Rabson wrote: > If you are re-organising things, would it be possible to do whatever is > necessary to facilitate merging in all the FreeBSD bits? I would quite > like to get all that stuff into the mainline sources at some point. I'm not going to be committing anything soon, but it's certainly a good idea to get things in place as much as possible for the FreeBSD port. Can you explain (or point to an old email message if there is one) what the differences are, what changes are required? Thanks. N |
|
From: Doug R. <df...@nl...> - 2004-08-03 09:40:56
|
On Tuesday 03 August 2004 10:34, Nicholas Nethercote wrote: > On Mon, 2 Aug 2004, Doug Rabson wrote: > > If you are re-organising things, would it be possible to do > > whatever is necessary to facilitate merging in all the FreeBSD > > bits? I would quite like to get all that stuff into the mainline > > sources at some point. > > I'm not going to be committing anything soon, but it's certainly a > good idea to get things in place as much as possible for the FreeBSD > port. Can you explain (or point to an old email message if there is > one) what the differences are, what changes are required? There is a thread on this mailing list from back in January which covers some of it. This message <107...@he...> includes some detail on what is different in the FreeBSD valgrind. |