<div>Hi Dave,</div>
<div> </div>
<div>Patch for the Message 2 of <strong>Crash-utility Digest, Vol 10, Issue 2</strong> </div>
<div>"To improve readability of mount command in Crash"</div>
<div>
<p>--- /usr/src/redhat/BUILD/crash-4.0-2.30/filesys.c      2006-06-06 21:46:32.000000000 +0200<br>+++ filesys.c   2006-07-06 13:43:57.000000000 +0200<br>@@ -1144,6 +1144,7 @@ cmd_mount(void)<br>        ulong vfsmount = 0;
<br>        int flags = 0;<br>        int save_next;<br>+       int mh_flag=1;</p>
<p>         while ((c = getopt(argcnt, args, "if")) != EOF) {<br>                 switch(c)<br>@@ -1202,7 +1203,11 @@ cmd_mount(void)<br>                                                sscanf(buf2,"%lx",&vfsmount);
<br>                                                show_mounts(vfsmount, flags);<br>                                        } else {<br>+                                               if(mh_flag)<br>+                                               {
<br>                                                fprintf(fp, mount_hdr);<br>+                                               mh_flag=0;<br>+                                               }<br>                                                fprintf(fp, buf2);
<br>                                        }<br>                                        found = FALSE;<br></p></div>
<div>
<p>Regards</p>
<p>Hariharan T.S.</p></div>
<div><br><br><br> </div>
<div><span class="gmail_quote">On 7/5/06, <b class="gmail_sendername"><a href="mailto:crash-utility-request@redhat.com">crash-utility-request@redhat.com</a></b> <<a href="mailto:crash-utility-request@redhat.com">crash-utility-request@redhat.com
</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Send Crash-utility mailing list submissions to<br>       <a href="mailto:crash-utility@redhat.com">crash-utility@redhat.com
</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>       <a href="https://www.redhat.com/mailman/listinfo/crash-utility">https://www.redhat.com/mailman/listinfo/crash-utility</a><br>or, via email, send a message with subject or body 'help' to
<br>       <a href="mailto:crash-utility-request@redhat.com">crash-utility-request@redhat.com</a><br><br>You can reach the person managing the list at<br>       <a href="mailto:crash-utility-owner@redhat.com">crash-utility-owner@redhat.com
</a><br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Crash-utility digest..."<br><br><br>Today's Topics:<br><br>  1. why gdb backtracing not being used in crash (Rachita Kothiyal)
<br>  2. Re: Crash : To improve readability of mount command       inCrash.<br>     (Dave Anderson)<br>  3. Re: bt -f fix for s390(x) (Dave Anderson)<br>  4. Re: why gdb backtracing not being used in crash (Dave Anderson)
<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Wed, 5 Jul 2006 15:25:46 +0530<br>From: Rachita Kothiyal <<a href="mailto:rachita@in.ibm.com">rachita@in.ibm.com
</a>><br>Subject: [Crash-utility] why gdb backtracing not being used in crash<br>To: <a href="mailto:anderson@redhat.com">anderson@redhat.com</a><br>Cc: <a href="mailto:crash-utility@redhat.com">crash-utility@redhat.com
</a><br>Message-ID: <<a href="mailto:20060705095546.GA1761@in.ibm.com">20060705095546.GA1761@in.ibm.com</a>><br>Content-Type: text/plain; charset=us-ascii<br><br>Hi Dave<br><br>I was wondering why in crash we are not using the already existing
<br>bt via the gdb_interface(). I see it being used in case of alpha<br>and ppc64, but am not sure if it works. Could you please throw some<br>light on the rationale behind this...<br><br>Thanks<br>Rachita<br><br><br><br>
------------------------------<br><br>Message: 2<br>Date: Wed, 05 Jul 2006 09:21:21 -0400<br>From: Dave Anderson <<a href="mailto:anderson@redhat.com">anderson@redhat.com</a>><br>Subject: Re: [Crash-utility] Crash : To improve readability of mount
<br>       command         inCrash.<br>To: "Discussion list for crash utility usage, maintenance and<br>       development"    <<a href="mailto:crash-utility@redhat.com">crash-utility@redhat.com</a>><br>Message-ID: <
<a href="mailto:44ABBCD1.9A3EB28B@redhat.com">44ABBCD1.9A3EB28B@redhat.com</a>><br>Content-Type: text/plain; charset="us-ascii"<br><br>"Hariharan T.S." wrote:<br><br>>  Hi All Just a suggestion for improved readablity in crash for mount 
command.Instead of printing header every time for<br>> each line, It can be limited to one header at the top.crash> mount /VFSMOUNT SUPERBLK TYPE DEVNAME DIRNAME1100800<br>> 10ec800 rootfs rootfs /VFSMOUNT SUPERBLK TYPE DEVNAME DIRNAME1100200 10e9400 ext3 /dev/root /crash> mount
<br>> /procVFSMOUNT SUPERBLK TYPE DEVNAME DIRNAME1100280 10ec400 proc /proc /procVFSMOUNT SUPERBLK TYPE DEVNAME<br>> DIRNAME1100f00 10ec400 proc /proc /proccrash> RegardsHariharan T.S.<br><br>What -- no patch to fix it?   ;-)
<br><br>Yeah, those are unique cases, because even though you<br>are requesting just one directory via the extra command line<br>argument, there are two unique vfsmount entries, i.e,<br>the rootfs and ext3 types for the / directory.  (I can't
<br>reproduce the two /proc entries as in your example.)<br><br>Anyway, there should be a flag set somewhere to avoid<br>the duplicate headers.  I'll add it to the crash.TODO list:<br><br><a href="http://people.redhat.com/anderson/crash.TODO.html">
http://people.redhat.com/anderson/crash.TODO.html</a><br><br>Thanks,<br>Dave<br><br><br><br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <a href="https://www.redhat.com/archives/crash-utility/attachments/20060705/57de55bc/attachment.html">
https://www.redhat.com/archives/crash-utility/attachments/20060705/57de55bc/attachment.html</a><br><br>------------------------------<br><br>Message: 3<br>Date: Wed, 05 Jul 2006 11:29:35 -0400<br>From: Dave Anderson <<a href="mailto:anderson@redhat.com">
anderson@redhat.com</a>><br>Subject: [Crash-utility] Re: bt -f fix for s390(x)<br>To: Michael Holzheu <<a href="mailto:holzheu@de.ibm.com">holzheu@de.ibm.com</a>><br>Cc: <a href="mailto:crash-utility@redhat.com">
crash-utility@redhat.com</a><br>Message-ID: <<a href="mailto:44ABDADF.8657728E@redhat.com">44ABDADF.8657728E@redhat.com</a>><br>Content-Type: text/plain; charset=us-ascii<br><br>Michael Holzheu wrote:<br><br>> Hi Dave,
<br>><br>> Here comes a fix for the bt -f command.<br>><br>> The problem is that when the backchain is invalid on s390(x) we can get huge values for the stackframe size. This can lead to a termination of crash with a SIGSEGV. To fix this, we have to use in case of an invalid backchain the difference between the current backchain and the end of the stack as stackframe size.
<br>><br>> ---<br>><br><br>Thanks Michael -- queued for the next release.<br><br>Dave<br><br><br>><br>> diff -Naur crash-4.0-2.31/s390.c crash-4.0-2.31-s390-bt-f.fix/s390.c<br>> --- crash-4.0-2.31/s390.c       2006-06-27 16:15:
32.000000000 +0200<br>> +++ crash-4.0-2.31-s390-bt-f.fix/s390.c 2006-07-03 16:37:34.000000000 +0200<br>> @@ -714,7 +714,9 @@<br>>                                 frame_size = stack_base - old_backchain<br>>                                              + KERNEL_STACK_SIZE;
<br>>                         } else {<br>> -                               frame_size = backchain - old_backchain;<br>> +                               frame_size = MIN((backchain - old_backchain),<br>> +                                       (stack_base - old_backchain +
<br>> +                                       KERNEL_STACK_SIZE));<br>>                         }<br>>                         for(j=0; j< frame_size; j+=4){<br>>                                 if(j % 16 == 0){
<br>> diff -Naur crash-4.0-2.31/s390x.c crash-4.0-2.31-s390-bt-f.fix/s390x.c<br>> --- crash-4.0-2.31/s390x.c      2006-06-27 16:15:32.000000000 +0200<br>> +++ crash-4.0-2.31-s390-bt-f.fix/s390x.c        2006-07-03 16:37:
37.000000000 +0200<br>> @@ -747,7 +747,9 @@<br>>                                 frame_size = stack_base - old_backchain<br>>                                              + KERNEL_STACK_SIZE;<br>>                         } else {
<br>> -                               frame_size = backchain - old_backchain;<br>> +                               frame_size = MIN((backchain - old_backchain),<br>> +                                       (stack_base - old_backchain +
<br>> +                                       KERNEL_STACK_SIZE));<br>>                         }<br>>                         for(j=0; j< frame_size; j+=4){<br>>                                 if(j % 16 == 0){
<br><br><br><br>------------------------------<br><br>Message: 4<br>Date: Wed, 05 Jul 2006 11:38:57 -0400<br>From: Dave Anderson <<a href="mailto:anderson@redhat.com">anderson@redhat.com</a>><br>Subject: [Crash-utility] Re: why gdb backtracing not being used in
<br>       crash<br>To: <a href="mailto:rachita@in.ibm.com">rachita@in.ibm.com</a><br>Cc: <a href="mailto:crash-utility@redhat.com">crash-utility@redhat.com</a><br>Message-ID: <<a href="mailto:44ABDD11.C5BEFDF1@redhat.com">
44ABDD11.C5BEFDF1@redhat.com</a>><br>Content-Type: text/plain; charset=us-ascii<br><br>Rachita Kothiyal wrote:<br><br>> Hi Dave<br>><br>> I was wondering why in crash we are not using the already existing<br>> bt via the gdb_interface(). I see it being used in case of alpha
<br>> and ppc64, but am not sure if it works. Could you please throw some<br>> light on the rationale behind this...<br>><br>> Thanks<br>> Rachita<br><br>I could never get it to work, except "sort-of" on alpha.  But even
<br>on alpha, it would only go back as far as the first kernel exception<br>frame, and then would go off into the weeds.  I don't know anything<br>about the ppc64 -- you can ask Haren about that...<br><br>As I recall, there was a whole bunch of user environment stuff
<br>that needed to be faked/replicated for it to even come close to<br>working correctly, i.e., stuff that gdb would be gathering when<br>running on a user process.<br><br>Dave<br><br><br><br><br>------------------------------
<br><br>--<br>Crash-utility mailing list<br><a href="mailto:Crash-utility@redhat.com">Crash-utility@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/crash-utility">https://www.redhat.com/mailman/listinfo/crash-utility
</a><br><br><br>End of Crash-utility Digest, Vol 10, Issue 2<br>********************************************<br></blockquote></div><br>