couldn't establish connection to remote target: kgdb

2008-01-26 Thread Sanjeev Kumar.S
Hi,
 I'm facing an issue of not being able to connect to the target from the
host on i386 on 6.2-RELEASE. I get a Couldn't establish connection
to remote target, everytime.

1) Yes, both the baud on source and sink is 9600, confirmed doing a tty -a -f 
/dev/cuad0.
2) and /etc/ttys has ttyd0 and ttyd1 both turned off for getty.
3) i even did a cat  /dev/cuad0 and echo hello  /dev/cuad0. and I get
the characters on the other side correctly. 

configured kernel with GDB, KDB, DDB. and started kgdb like this
kgdb -r /dev/cuad0 kernel.debug. and I get :
Ignoring packet error, continuing...
Couldn't establish connection to remote target
malformed response to  offset query, timeout.

Can some-one, a hacker will have encountered such situations, please
answer my dilemma. 

Thanks,
Sanjeev.

   
-
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


kgdb in emacs

2008-01-26 Thread Sanjeev Kumar.S
Hi, 
 I'm trying to use kgdb in emacs on Freebsd V6.2. I'm able to use kgdb 
 on the command line like this 
 kgdb -r /dev/cuad0 kernel.debug.
 In 6.2 there is no gdb -k, only kgdb.

 But when I run it in emacs. M-x gdb
 Run gdb ( like this ) : kgdb -r /dev/cuad0 kernel.debug
 I get :
 Current directory is /dev/
 kgdb: multiple core files specified. Ignored
 kgdb: d: No such file or directory.
 Debugger exited abnormally with code 1

 Why is emacs even interpretting my commands.
 Why doesn't it just call kgdb with whatever arguments
 I give ?  

Regards,
Sanjeev.
 
   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


synchronous freebsd print

2008-02-27 Thread Sanjeev Kumar.S
Hi,
 I have a quick question, and I believe this will 
be a common requirement.
 
I do a print of some data and then immediately 
in a next statement there is a crash. But the
print is not complete, before it completes there
is a crash, the print is about 6-9 lines .
Is there anyway to get the complete print
before executing the next instruction. like
putting a delay before executing the next
instruction.

Regards,
Sanjeev.

 

   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: synchronous freebsd print

2008-02-27 Thread Sanjeev Kumar.S
 This is a standard C question.
 
 Sorry, if this clarification is too simple, but I
 thought freeBSD kernel implemented its own
 print function. and the man for fflush says it is
 in the standard C-library.
 and the kernel source has no defn for fflush.
 
 I saw lots of kernel related questions asked 
in this list, so I posted my question here. Please
correct me if I am wrong.

and Yes in the kernel code I have a \n at the end
of my print, still the print is not complete and 
the line next to it that causes the crash does
not give the result I want. Is this a common
scenario or am I doing something wrong.

Sanjeev.

Peter Jeremy [EMAIL PROTECTED] wrote: On Wed, Feb 27, 2008 at 12:08:28AM 
-0800, Sanjeev Kumar.S wrote:
 I have a quick question, and I believe this will 
be a common requirement.

This is a standard C question.
 
I do a print of some data and then immediately 
in a next statement there is a crash.
...
Is there anyway to get the complete print
before executing the next instruction.

Look at fflush(3)

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.


   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


seemingly good gdbinit for freebsd kernel errors out

2008-04-02 Thread Sanjeev Kumar.S
Hi,
 Im trying to debug a gdb init script that errors 
 out saying: too few arguments in function call

 Here is the script

define kldload
  set $kld = linker_files.tqh_first
  set $done = 0
  while ($kld != 0  $done == 0)
if ($kld-filename == $arg0)
  set $done = 1
else
  set $kld = $kld-link.tqe_next
end
  end
  if ($done == 1)
shell /usr/bin/objdump -h $arg0 | \
  awk '/ .text/ { print set \$offset = 0x $6 }'  .kgdb.temp
source .kgdb.temp
add-symbol-file $arg0 $kld-address + $offset
  end
end

document kldload
  Loads a module. Arguments are module name and offset of text section.
end

Any thoughts ?

Thanks,
Sanjeev.

   
-
You rock. That's why Blockbuster's offering you one month of Blockbuster Total 
Access, No Cost.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Saving entire console sessions

2008-04-24 Thread Sanjeev Kumar.S
Hi, 
Is there any way to save entire console 
sessions ?
Screen asks me to copy and paste what 
I want. I don't want to do that I need to save 
 entire sessions. like a start till I do a exit or
  quit the application. Is there a utility like 
that ?

Regards,
Sanjeev.

   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Saving entire console sessions

2008-05-03 Thread Sanjeev Kumar.S
Thank you this serves my purpose very well.

Pranav Peshwe [EMAIL PROTECTED] wrote: On Thu, Apr 24, 2008 at 5:57 PM, 
Sanjeev Kumar.S 
wrote:

 Hi,
Is there any way to save entire console
sessions ?
Screen asks me to copy and paste what
I want. I don't want to do that I need to save
 entire sessions. like a start till I do a exit or
  quit the application. Is there a utility like
that ?


Did you try enabling logging for a screen window ? `screen -L` may be of
help.

Best regards,
Pranav

--
Blessed are the pessimists, for they take backups!!
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Saving entire console sessions

2008-05-03 Thread Sanjeev Kumar.S
Sorry, did not mean to. Thank you very much for the suggestion.
Suits my requirement very well.

Regards,
Sanjeev.

Rink Springer [EMAIL PROTECTED] wrote: Hi,

On Thu, Apr 24, 2008 at 05:27:36AM -0700, Sanjeev Kumar.S wrote:
 Is there any way to save entire console 
 sessions ?
 Screen asks me to copy and paste what 
 I want. I don't want to do that I need to save 
  entire sessions. like a start till I do a exit or
   quit the application. Is there a utility like 
 that ?

Please, don't hijack the thread next time :-) Either way, have a look at
script(1) - I think that is what you are looking for.

Regards,

-- 
Rink P.W. Springer- http://rink.nu
Anyway boys, this is America. Just because you get more votes doesn't
 mean you win. - Fox Mulder
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]


   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to [EMAIL PROTECTED]