Re: freebsd-hackers Digest, Vol 305, Issue 6

2009-02-03 Thread Guillaume Ballet
On Sat, Jan 31, 2009 at 1:00 PM,  freebsd-hackers-requ...@freebsd.org wrote:

 Message: 4
 Date: Fri, 30 Jan 2009 09:41:58 -0800
 From: Matthew Fleming matthew.flem...@isilon.com
 Subject: Dynamic ddb commands
 To: freebsd-hackers@freebsd.org
 Message-ID: 127318.13748.101.ca...@amaretto
 Content-Type: text/plain;   charset=iso-8859-1

 I'm working on BSD 6.x and of course the set of ddb commands is static
 to whatever is in the kernel at compile.  I see that BSD 7.1 has dynamic
 commands using sysinits and sysuninit's to call a new
 db_[un]register_cmd.

 I see this, though, only after I have spent a day or so adding a
 linker_file_[un]register_ddb() that works similarly to how sysinits are
 merged for the boot-time modules (malloc and copy pointers).  It seems
 to me that this solution (have the linker look for db_set and db_cmd_set
 and, if there are any entries, malloc and save pointers to commands) is
 more efficient in terms of space than adding a LIST to the command
 structure and then forcing sysinits to run.

This is what I proposed at first, you can find a patch doing just that
following that thread:
http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg65165.html

But Sam and John suggested to use the sysinit facility instead. I am
convinced they are right:
- Sysinits are a proven system, this is the least friction path. Also,
by adding functions to the linker you still have the (small but
existing) risk of adding bugs to that system.
- This require adding new sections. Now, on regular x86 machines that
doesn't seem too much of a problem. I am however currently working on
a port of FreeBSD to some ARM cortex-based board. When debugging using
JTAG, the smaller amount of sections whose location in physical memory
I have to care about, the simpler for me and those doing the same kind
of work.
- You are not forcing sysinits to run: they are run no matter what
when loading a module.
- You can still debug sysinits when inserting modules, as the core of
the debugger is already running and the list has been loaded in
memory. The modules command itself will of course not be available,
but the base commands will still be here.

Cheers,
Guillaume
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Fw: request responsibility timeout

2009-02-03 Thread Dominic Fandrey
Mark Linimon wrote:
 On Mon, Feb 02, 2009 at 05:17:38PM +0100, Dominic Fandrey wrote:
 I want to request a responsibility timeout for bin/120784
 
 (with bugmeister hat) AFAIK no one else other than rodrigc has been
 doing work on the mount utilities, so I don't know who else to assign
 it to.
 
 mcl

I suppose I'll just have to wait. Thank you for taking a look.

Regards
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: usinig cvs diff to make a patch

2009-02-03 Thread Garance A Drosihn

At 2:17 PM -0500 2/3/09, Aryeh M. Friedman wrote:
I use a local cvs repo and I have modified a port and which to 
submit an update for it how do I generate a patch file with cvs (cvs 
diff seems to give a unusable format)?


try:   cvs diff -u

In my case, i have added the following line to my ~/.cvsrc file:

diff -uN

(-N means treat absent files as empty)

--
Garance Alistair Drosehn=   g...@gilead.netel.rpi.edu
Senior Systems Programmer   or  g...@freebsd.org
Rensselaer Polytechnic Instituteor  dro...@rpi.edu
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: usinig cvs diff to make a patch

2009-02-03 Thread Chuck Robey
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Aryeh M. Friedman wrote:
 I use a local cvs repo and I have modified a port and which to submit an
 update for it how do I generate a patch file with cvs (cvs diff seems to
 give a unusable format)?
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

cvs diff -u gives the unified format (or cvs diff -c for context, get the
pattern?)  Or, copying from the web page
http://www.eyrie.org/~eagle/notes/cvs/basic-usage.html, which shows how to use
the ~/.cvsrc file to make common cvs commands default the way you want them to,
you could put into that file the line diff -u so it always gives you the
unified diff format, which just happens to be the easiest for humans to read,
and the format specified in FreeBSD (hint, hint).
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmIm9EACgkQz62J6PPcoOnRlQCeIT8vsLZ6LI764WOaTQy72ym4
Tp0AoJ43TIQYsGFz8YYD2ChhMSUU0Wpc
=ta5/
-END PGP SIGNATURE-
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: usinig cvs diff to make a patch

2009-02-03 Thread Tom Evans
On Tue, 2009-02-03 at 14:32 -0500, Chuck Robey wrote:
 Aryeh M. Friedman wrote:
  I use a local cvs repo and I have modified a port and which to submit an
  update for it how do I generate a patch file with cvs (cvs diff seems to
  give a unusable format)?
  ___
  freebsd-hackers@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
  To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
 
 cvs diff -u gives the unified format (or cvs diff -c for context, get the
 pattern?)  Or, copying from the web page
 http://www.eyrie.org/~eagle/notes/cvs/basic-usage.html, which shows how to use
 the ~/.cvsrc file to make common cvs commands default the way you want them 
 to,
 you could put into that file the line diff -u so it always gives you the
 unified diff format, which just happens to be the easiest for humans to read,
 and the format specified in FreeBSD (hint, hint).

When reading this, I was immediately reminded of this passage from
development(7), describing how to set up a local cvs repository for
src/ports...:

... you need to set up a ~/.cvsrc (/root/.cvsrc) file, as shown
below, for proper cvs(1) operation.  Using ~/.cvsrc to specify
cvs(1) defaults is an excellent way to ``file and forget'', but
you should never forget that you put them in there.

# cvs -q
diff -u
update -Pd
checkout -P

Cheers

Tom


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


pmap.h: No such file or directory---- Debugging error

2009-02-03 Thread Kamlesh Patel
Hi All,

I have two system one is Debug and another is Target machine. I am debugging 
using kgdb from Debug machine.

Line no: 272 into the function vm_page_startup( vaddr ) of vm_page.c - Freebsd 
7.0,
mapped=pmap() is there. when i press S (step by step debug) then

(kgdb)s
pmap_map( , , , ,) at /usr/src/sys/i386/i386/pmap.c:1089
1089   va=sva=*virt
(kgdb)s
1090   while(start  end){
(kgdb)s
310pmap.h: No such file or directory
 


Same thing happens with pmap_invalidate_range()
pcpu.h: No such file or directory

Could anyone help me?

Thanks
Kamlesh
MS CS CSUS


  

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: pmap.h: No such file or directory---- Debugging error

2009-02-03 Thread Julian Elischer

Kamlesh Patel wrote:

Hi All,

I have two system one is Debug and another is Target machine. I am debugging 
using kgdb from Debug machine.

Line no: 272 into the function vm_page_startup( vaddr ) of vm_page.c - Freebsd 
7.0,
mapped=pmap() is there. when i press S (step by step debug) then

(kgdb)s
pmap_map( , , , ,) at /usr/src/sys/i386/i386/pmap.c:1089
1089   va=sva=*virt
(kgdb)s
1090   while(start  end){
(kgdb)s
310pmap.h: No such file or directory
 



Same thing happens with pmap_invalidate_range()
pcpu.h: No such file or directory

Could anyone help me?


have you tried:

(gdb) help directory
Add directory DIR to beginning of search path for source files.
Forget cached info on source file locations and line positions.
DIR can also be $cwd for the current working directory, or $cdir for the
directory in which the source file was compiled into object code.
With no argument, reset the search path to $cdir:$cwd, the default.



Thanks
Kamlesh
MS CS CSUS


  


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: usinig cvs diff to make a patch

2009-02-03 Thread Dimitry Andric
On 2009-02-03 20:17, Aryeh M. Friedman wrote:
 I use a local cvs repo and I have modified a port and which to submit an 
 update for it how do I generate a patch file with cvs (cvs diff seems to 
 give a unusable format)?

Use cvs diff -up for unified diff format, with function prototypes.


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: write-only variables in src/sys/ - possible bugs

2009-02-03 Thread Christian Peron
I started following up on this and ran into an issue for these:

sys/net/bpf_buffer.c:133: warning: variable 'dst' is never read
sys/net/bpf_buffer.c:134: warning: variable 'count' is never read
sys/net/bpf_buffer.c:142: warning: variable 'dst' is never read


/*
 * Scatter-gather data copy from an mbuf chain to the current kernel buffer.
 */
void
bpf_buffer_append_mbuf(struct bpf_d *d, caddr_t buf, u_int offset, void *src,
u_int len)
{
const struct mbuf *m;
u_char *dst;
u_int count;
 
m = (struct mbuf *)src;
dst = (u_char *)buf + offset;
while (len  0) {
if (m == NULL)
panic(bpf_mcopy);
count = min(m-m_len, len);
bcopy(mtod(m, void *), dst, count);
m = m-m_next;
[..]

Does it not consider being passed as an argument to a function as
being read?

Cheers
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


usinig cvs diff to make a patch

2009-02-03 Thread Aryeh M. Friedman
I use a local cvs repo and I have modified a port and which to submit an 
update for it how do I generate a patch file with cvs (cvs diff seems to 
give a unusable format)?

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: usinig cvs diff to make a patch

2009-02-03 Thread Scott Ullrich
On Tue, Feb 3, 2009 at 2:17 PM, Aryeh M. Friedman
aryeh.fried...@gmail.com wrote:
 I use a local cvs repo and I have modified a port and which to submit an
 update for it how do I generate a patch file with cvs (cvs diff seems to
 give a unusable format)?

Maybe try cvs diff -uN ?

Scott
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org