[darwinbuild] Custom flags and PB Projects
Hi, I've searched the archives and the darwinbuild website for this one, and tried some things of my own, and haven't been able to find an answer, so here I am :-). I'm trying to hunt down a crash in /usr/libexec/bootpd by building a custom bootp-133.6 from Darwin 8G32, using darwinbuild. I want to turn on as much debugging as I can using -ggdb so that I can inspect variables and list source; the default seems to be '-g' which doesn't contain source listing: (gdb) list 1 {standard input}: No such file or directory. in {standard input} Now bootp is a project builder project with a Makefile; I've tried modifying settings in Makefile.postamble including ALL_MFLAGS and ALL_CFLAGS, and DEBUG_SYMBOLS_CFLAGS but they don't get picked up when I subsequently invoke darwinbuild bootp. It still uses the default compiler flags. How do I modify this project to include custom compiler flags? Thanks, Graham.
darwinbuild creates a symboled version by default. Look in the "Symbols" directory at the top level of your build area. It should have something like: [ssen@stargate]$ nm -ap Symbols/bootp/bootpd | grep SO | grep bootp | head 00002288 - 01 0000 SO /SourceCache/bootp/bootp-133.6/bootpd.tproj/ 00002288 - 01 0000 SO bootpd.m 00000000 - 00 0000 SOL bootpd.m 00000000 - 00 0000 SOL bootpd.m 00000000 - 00 0000 SOL ../bootplib/netinfo.h -g is the same as -ggdb on Mac OS X. What you are most likely seeing is the fact that after linking, the final product is stripped and a copy of the *un*stripped binary put in the SYMROOT. Where are you modifying the source? To build modified source, untar the source directory in Sources/, make your changes there, and then re-run darwinbuild Shantonu On Feb 9, 2006, at 6:24 AM, Graham J Lee wrote:
Hi,
I've searched the archives and the darwinbuild website for this one, and tried some things of my own, and haven't been able to find an answer, so here I am :-).
I'm trying to hunt down a crash in /usr/libexec/bootpd by building a custom bootp-133.6 from Darwin 8G32, using darwinbuild. I want to turn on as much debugging as I can using -ggdb so that I can inspect variables and list source; the default seems to be '-g' which doesn't contain source listing:
(gdb) list 1 {standard input}: No such file or directory. in {standard input}
Now bootp is a project builder project with a Makefile; I've tried modifying settings in Makefile.postamble including ALL_MFLAGS and ALL_CFLAGS, and DEBUG_SYMBOLS_CFLAGS but they don't get picked up when I subsequently invoke darwinbuild bootp. It still uses the default compiler flags. How do I modify this project to include custom compiler flags?
Thanks,
Graham. _______________________________________________ darwinbuild mailing list darwinbuild@opendarwin.org http://www.opendarwin.org/mailman/listinfo/darwinbuild
On 9 Feb 2006, at 15:32, Shantonu Sen wrote:
darwinbuild creates a symboled version by default. Look in the "Symbols" directory at the top level of your build area. It should have something like: [ssen@stargate]$ nm -ap Symbols/bootp/bootpd | grep SO | grep bootp | head 00002288 - 01 0000 SO /SourceCache/bootp/bootp-133.6/bootpd.tproj/ 00002288 - 01 0000 SO bootpd.m 00000000 - 00 0000 SOL bootpd.m 00000000 - 00 0000 SOL bootpd.m 00000000 - 00 0000 SOL ../bootplib/netinfo.h
-g is the same as -ggdb on Mac OS X. What you are most likely seeing is the fact that after linking, the final product is stripped and a copy of the *un*stripped binary put in the SYMROOT.
Oh, you're right, I was looking in Roots/bootp/bootp-133.6.root~X/ not Symbols/... Thanks for that :-)
Where are you modifying the source? To build modified source, untar the source directory in Sources/, make your changes there, and then re-run darwinbuild
Yup, that's what I'm doing. But changes in Makefile.postamble don't appear to be honoured (that or I'm modifying the wrong variables, which is always a possibility). I've checked both by running darwinbuild, and just by invoking make in Sources/bootp-133.6 and apart from the fact that the second attempt dies anyway, they both produce the same cc invocations (without my custom flags). I've since tracked down my crash with good ol' fprintf() anyway, but thanks for the pointers. Cheers, Graham. -- Graham Lee GPG Key ID: 01D5B9D8 UNIX Systems Manager, Oxford Physics Practical Course http://users.ox.ac.uk/~wadh1342 01865 273450
participants (2)
-
Graham J Lee
-
Shantonu Sen