From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Goldstein Subject: Re: [RFC PATCH 2/2] build: convert crash_debug to Kconfig Date: Fri, 25 Mar 2016 16:02:56 -0500 Message-ID: <56F5A780.9080502@cardoe.com> References: <1458838099-12053-1-git-send-email-cardoe@cardoe.com> <1458838099-12053-2-git-send-email-cardoe@cardoe.com> <20160325194927.GD14689@char.us.oracle.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6870630595286520250==" Return-path: In-Reply-To: <20160325194927.GD14689@char.us.oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Konrad Rzeszutek Wilk Cc: Andrew Cooper , Keir Fraser , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============6870630595286520250== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xuFGLjJ1moJDh5cBxjIxEnD4MwSl1vHjw" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xuFGLjJ1moJDh5cBxjIxEnD4MwSl1vHjw Content-Type: multipart/mixed; boundary="93LnPrxGEg0ojjsr9gtxvXb34GkVTb0Li" From: Doug Goldstein To: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xen.org, Keir Fraser , Jan Beulich , Andrew Cooper Message-ID: <56F5A780.9080502@cardoe.com> Subject: Re: [Xen-devel] [RFC PATCH 2/2] build: convert crash_debug to Kconfig References: <1458838099-12053-1-git-send-email-cardoe@cardoe.com> <1458838099-12053-2-git-send-email-cardoe@cardoe.com> <20160325194927.GD14689@char.us.oracle.com> In-Reply-To: <20160325194927.GD14689@char.us.oracle.com> --93LnPrxGEg0ojjsr9gtxvXb34GkVTb0Li Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 3/25/16 2:49 PM, Konrad Rzeszutek Wilk wrote: > On Thu, Mar 24, 2016 at 11:48:19AM -0500, Doug Goldstein wrote: >> Convert the crash_debug option to Kconfig as CONFIG_CRASH_DEBUG. This >> was previously togglable on the command line so this adds a message fo= r >> users enabling it from the command line to tell them to enable it from= >> make menuconfig. >> >> Signed-off-by: Doug Goldstein >> --- >> This is an example of using the debug menu. >> >> >> CC: Keir Fraser >> CC: Jan Beulich >> CC: Andrew Cooper >> --- >> docs/misc/crashdb.txt | 4 ++-- >> xen/Kconfig.debug | 11 +++++++++++ >> xen/Rules.mk | 5 +++-- >> xen/arch/x86/Makefile | 3 +-- >> xen/arch/x86/x86_64/Makefile | 2 +- >> xen/common/Makefile | 2 +- >> xen/include/asm-x86/debugger.h | 2 +- >> xen/include/xen/gdbstub.h | 2 +- >> 8 files changed, 21 insertions(+), 10 deletions(-) >> >> diff --git a/docs/misc/crashdb.txt b/docs/misc/crashdb.txt >> index b41a538..9733666 100644 >> --- a/docs/misc/crashdb.txt >> +++ b/docs/misc/crashdb.txt >> @@ -5,7 +5,7 @@ Xen has a simple gdb stub for doing post-mortem debugg= ing i.e. once >> you've crashed it, you get to poke around and find out why. There's >> also a special key handler for making it crash, which is handy. >> =20 >> -You need to have crash_debug=3Dy set when compiling , and you also ne= ed >> +You need to have CRASH_DEBUG=3Dy set when compiling, and you also nee= d >> to enable it on the Xen command line, eg by gdb=3Dcom1. >> =20 >> If you need to have a serial port shared between gdb and the console,= >> @@ -19,7 +19,7 @@ if you have a simple null modem connection between t= he test box and >> the workstation, and aren't using a H/L split console: >> =20 >> * Set debug=3Dy in Config.mk >> - * Set crash_debug=3Dy in xen/Rules.mk >> + * Set CRASH_DEBUG=3Dy with `make -C xen menuconfig` >> * Make the changes in the attached patch, and build. >> * Arrange to pass gdb=3Dcom1 as a hypervisor command line argument >> (I already have com1=3D38400,8n1 console=3Dcom1,vga sync_console)= >> diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug >> index 36890bd..3336a64 100644 >> --- a/xen/Kconfig.debug >> +++ b/xen/Kconfig.debug >> @@ -4,3 +4,14 @@ menuconfig DEBUG >> ---help--- >> If you want to debug Xen say Y and select any additional debugging= >> support options. >> + >> +if DEBUG >=20 > Perhaps if !defined then atuomatically enable it? Looking at Config.mk > it seems you could do crash_debug without debug=3Dy? debug=3Dy unfortunately is more than just a "meta" option that selects verbose=3Dy and frame_pointer=3Dy. It also turns off NDEBUG so that debug= messages appear. I'm not sure how that should be mapped in the context of this patch. Should the messages be enabled when DEBUG is enabled or should there be another option? If debug messages are enabled with DEBUG that would certainly be a behavior change since now someone could have crash_debug=3Dy debug=3Dn bu= t I'm not sure if that's desired? >=20 > Why is this called crash_debug and not 'crash_gdb' ..? Ah [after readin= g the docs] > it can't do breakpoints or any of that. Just to pour over the data afte= r a crash. > Ah, you can resume the hypervisor after this. OK, definitly not for fie= ld > analysis. >=20 > And kexec/kdump is much more powerful than this. yeah I wondered that myself as well and came to the conclusion it was limited. Good point about kexec/kdump. I should definitely update the description to be more verbose. >=20 >=20 >> + >> +config CRASH_DEBUG >> + bool "Crash Debugging Support" >> + depends on X86 >> + ---help--- >> + If you want to be able to attach gdb to Xen to be able to debug >> + Xen if it crashes then say Y. >=20 > Should it have a link to the docs ? On how to use it? yeah I think maybe just pointing someone to docs/misc/crashdb.txt cause its not immediately obvious that's the doc file to go with crash_debug. >=20 > And maybe mention that kexec/kdump is better suited for capturing the w= hole > machine and one can do post-mortem analysis much more intensly? Yeah that's a really good point. I didn't think of that. --=20 Doug Goldstein --93LnPrxGEg0ojjsr9gtxvXb34GkVTb0Li-- --xuFGLjJ1moJDh5cBxjIxEnD4MwSl1vHjw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0 iQJ8BAEBCgBmBQJW9aeAXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNTM5MEQ2RTNFMTkyNzlCNzVDMzIwOTVB MkJDMDNEQzg3RUQxQkQ0AAoJEKK8A9yH7RvUX9YP/2Gs9/puGAXwFCg2Ecr1I2nf /bdpVkWo7rfp/OY2rFVH2kFqOqnaAkRglCjvRss1s8BmWMVd0IK0eZwV9dHEU86U mpODEjniX9Lx1tsrsI67dXvhT02OJeUa0lVJe874/Yns1wHKX+nKZXCPA1+c46vO szxJxB2l69hYv45Ylb2QOlGWoKGu2ToLhQXRGP5VTEu5gZJ5R/4/gfJoJRk8ZsxD 3clKPllUK7SJyIE/Apg2YEx1m1/pjQXQA8+5F6zzPBScaefL4J2hV/UB8NjGKDiy oeLatrVGSa15O4m29k/dbsHkr23h+RAhkjviPGFs+DWz+jiY4U9EKSh3PL1BTEbK fj6LwiTGBtCbeB+qEFo4OsWQ0bWWOHY+X+JhiXdNb9Hq/x0F+mhy+tgMrr88imro PPY8e2uRsNNnEQsMCrRiBM4VcBnqN2pXpEYME7+gpXx7R/rCS8do995lJ15nynFn dRWxJ7wWhrRtALZ5+2nxQjQurmz4Kw+gpvQHoTF3CaBt/ESi2cKha/mt5WMrO3pA klv1ZcjUVNumiM5gXq23pqUADBYout7gFtvAHE768MRq0OLI/LvN3ush6xe0DEzR j/dZLcOjWfvqawAkXBs6JCEv1Y/qhOl6uOJqLSXIE6Bavc6aK4N5qWdyqqBav33j pikwQL066Dk/dcDNd90u =oHeq -----END PGP SIGNATURE----- --xuFGLjJ1moJDh5cBxjIxEnD4MwSl1vHjw-- --===============6870630595286520250== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============6870630595286520250==--