[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Request help (gdb cross debugger) Where is the latest best hppa1.1-unknown-linux-gnu source code for gdb?

"B. Douglas Hilton" writes...

> Could you possibly guide me through the process of applying
> these patches? I never know whether to use "patch -p0", "p1",
> actually I really don't understand patch or diff other than I have
> used it with explicit instructions.

The -p# is the number of levels of the path to strip off the front of the 
patch header. By default it strips everything and tries to patch in the 
current directory(which is ok for individual patches but almost never right 
for large multi-file patches). At least this is how I understand it, the patch 
man page explains it much better than I.

> I have:
> gdb_5.1.orig.tar.gz
> gdb_5.1-1.diff.gz
> and your patch which I have named "hppat.diff"
> Normally, I would do:
>     # cp gdb_5.1.orig.tar.gz gdb_5.1-1.diff.gz hppat.diff /usr/src/tmp
>     # cd /usr/src/tmp
>     # gzip -d gdb_5.1-1.diff.gz
>     # tar -zxvf gdb_5.1.orig.tar.gz
>     # cd gdb-5.1/
>     # patch -p??? < ../gdb_5.1-1.diff
>     # patch -p??? < ../hppat.diff

For this example you would use -p1 (although the fact that gdb source contains 
a directory named gdb/ makes it rather confusing).


Matt Taggart        Linux Development Lab
taggart@fc.hp.com   HP Linux Systems Operation

Reply to: