Hi Aditya, On Mon, Aug 12, 2024 at 5:58 PM Aditya Gupta <adityag@xxxxxxxxxxxxx> wrote: > > Hi Tao, > > On 12/08/24 04:58, Tao Liu wrote: > > Hi Aditya, > > > > On Mon, Aug 12, 2024 at 5:09 AM Aditya Gupta <adityag@xxxxxxxxxxxxx> wrote: > >> Hi Tao & Lianbo, > >> > >> This series works fine on PowerPC vmcores. Tried it with following > >> sequence of commands: > > Thanks for your updating and testing. Really appreciate it! > > > > Lianbo has suggested to me to make every patch compilable and no > > regression for each add, so I will work on the v6 to rearrange the > > patches, hopefully I can send it out this week. > > Thanks ! I haven't been able to help much, but maybe this script helps: > Sorry for the late response, I was handling some other issues at hand. thanks a lot for your script, it really helps! Thanks, Tao Liu > > I call it 'check_build_errors', and the usage for this patch series will > be `check_build_error 14`. > > This can be used to check if there are any build errors in a patch series. > > Do note though, it doesn't 'apply' the patches, we need to run it on a > branch we already have the patches applied on. > > > # script start > > #!/usr/bin/env bash > > # Written with BAM's help > if [ "$1" = "--help" ] || [ "$1" = "" ]; then > echo "Usage: check_build_errors [<number_of_commits>] > [-y|--force-yes] [--help]" > echo "Checks for build errors in the last <number_of_commits> commits." > echo "" > echo "Options:" > echo "--------" > echo " -y: set all configs to 'y' if 'make' asks for configs" > echo "" > echo "Exit Status: non-zero status if there are any build errors." > exit 0 > fi > > n=$1 > force_yes=$2 > branch=$(git rev-parse --abbrev-ref HEAD) > > if [[ "$branch" = "HEAD" ]]; then > # if HEAD is not a branch, and instead is a detached commit, use that as > # the branch name > branch=$(git rev-parse HEAD) > fi > > commits=$(git log --format=%H --reverse -$n $branch) > > function cleanup { > # remove the lock, to allow further git commands > rm -f .git/index.lock > > # Switch back to the branch > git checkout $branch > } > > trap "cleanup" INT > > while IFS= read -r commit; do > git checkout $commit > > # lock the repository, to ensure that while the script is building > the code, > # destructive actions like git checkout etc. are not allowed, else > code may > # change in between compiling > touch .git/index.lock > > if [ "$2" = "-y" ] || [ "$2" = "--force-yes" ]; then > yes "" | make -j`nproc` > build_res=$? > else > make -j`nproc` > build_res=$? > fi > > if [ $build_res -ne 0 ]; then > echo "Build error in commit $commit" > > cleanup > exit 1 > fi > > # remove the lock, since make is complete, and we need to run git > checkout > cleanup > done <<< "$commits" > > echo "No build errors found in the last $n commits." > # script end > > > Thanks, > > Tao Liu > > > >> (crash) set > >> (crash) set gdb on > >> gdb> thread > >> gdb> bt > >> gdb> info threads > >> gdb> info threads > >> gdb> info locals > >> gdb> info variables irq_rover_lock > >> gdb> info args > >> gdb> set gdb off > >> (crash) set > >> (crash) set -c 6 > >> (crash) gdb thread > >> (crash) bt > >> (crash) gdb bt > >> (crash) frame > >> (crash) gdb up > >> (crash) gdb down > >> (crash) info locals > >> > >> > >> Thanks, > >> > >> Aditya Gupta > >> > >> On 29/07/24 16:14, Tao Liu wrote: > >>> This patchset is a rebase/merged version of the following 3 patchsets: > >>> > >>> 1): [PATCH v10 0/5] Improve stack unwind on ppc64 [1] > >>> 2): [PATCH 0/5] x86_64 gdb stack unwinding support [2] > >>> 3): Clean up on top of one-thread-v2 [3] > >>> > >>> A complete description of gdb stack unwinding support for crash can be > >>> found in [1]. > >>> > >>> This patchset can be divided into the following 2 parts: > >>> > >>> 1) part1: arch independent, mainly modify on the > >>> crash_target.c/gdb_interface.c files, in preparation of the > >>> gdb side. > >>> 2) part2: arch specific part, for implementing ppc64/x86_64/arm64/vmware > >>> gdb stack unwinding support. > >>> > >>> === part 2 > >>> > >>> - arm64: > >>> arm64: Add gdb stack unwinding support > >>> > >>> - vmware: > >>> vmware_guestdump: Various format versions support > >>> set_context(): check if context is already current > >>> > >>> - x86_64: > >>> x86_64: Fix invalid input "=>" for bt command > >>> Fix cpumask_t recursive dependence issue > >>> x86_64: Add gdb stack unwinding support > >>> > >>> - ppc64: > >>> ppc64: correct gdb passthroughs by implementing machdep->get_cpu_reg > >>> > >>> === part 1 > >>> > >>> Stop stack unwinding at non-kernel address > >>> Fix gdb_interface: restore gdb's output streams at end of gdb_interface > >>> Print task pid/command instead of CPU index > >>> Rename get_cpu_reg to get_current_task_reg > >>> Let crash change gdb context > >>> Leave only one gdb thread for crash > >>> Remove 'frame' from prohibited commands list > >>> === > >>> > >>> v5 -> v4: > >>> 1) Plenty of code refactoring based on Lianbo's comments on v4. > >>> 2) Removed the magic number when dealing with regs bitmap, see [6]. > >>> 3) Rebased the patchset on top of latest upstream: > >>> ("1c6da3eaff8207 arm64: Fix bt command show wrong stacktrace on ramdump source") > >>> > >>> v4 -> v3: > >>> Fixed the author issue in [PATCH v3 06/16] Fix gdb_interface: restore gdb's > >>> output streams at end of gdb_interface. > >>> > >>> v3 -> v2: > >>> 1) Updated CC list as pointed out in [4] > >>> 2) Compiling issues as in [5] > >>> > >>> v2 -> v1: > >>> 1) Added the patch: x86_64: Fix invalid input "=>" for bt command, > >>> thanks for Kazu's testing. > >>> 2) Modify the patch: x86_64: Add gdb stack unwinding support, added the > >>> pcp_save, spp_save and sp, for restoring the value in match of the original > >>> code logic. > >>> > >>> [1]: https://www.mail-archive.com/devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx/msg00469.html > >>> [2]: https://www.mail-archive.com/devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx/msg00488.html > >>> [3]: https://www.mail-archive.com/devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx/msg00554.html > >>> [4]: https://www.mail-archive.com/devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx/msg00681.html > >>> [5]: https://www.mail-archive.com/devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx/msg00715.html > >>> [6]: https://www.mail-archive.com/devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx/msg00819.html > >>> > >>> Aditya Gupta (2): > >>> Remove 'frame' from prohibited commands list > >>> ppc64: correct gdb passthroughs by implementing machdep->get_cpu_reg > >>> > >>> Alexey Makhalov (2): > >>> set_context(): check if context is already current > >>> vmware_guestdump: Various format versions support > >>> > >>> Tao Liu (10): > >>> Leave only one gdb thread for crash > >>> Let crash change gdb context > >>> Rename get_cpu_reg to get_current_task_reg > >>> Print task pid/command instead of CPU index > >>> Fix gdb_interface: restore gdb's output streams at end of > >>> gdb_interface > >>> Stop stack unwinding at non-kernel address > >>> x86_64: Add gdb stack unwinding support > >>> Fix cpumask_t recursive dependence issue > >>> x86_64: Fix invalid input "=>" for bt command > >>> arm64: Add gdb stack unwinding support > >>> > >>> arm64.c | 114 +++++++++++++++- > >>> crash_target.c | 71 ++++++---- > >>> defs.h | 194 ++++++++++++++++++++++++++- > >>> gdb-10.2.patch | 79 +++++++++++ > >>> gdb_interface.c | 35 ++--- > >>> kernel.c | 65 +++++++-- > >>> ppc64.c | 175 ++++++++++++++++++++++++- > >>> symbols.c | 15 +++ > >>> task.c | 34 +++-- > >>> tools.c | 13 +- > >>> unwind_x86_64.h | 4 - > >>> vmware_guestdump.c | 316 +++++++++++++++++++++++++++++++------------- > >>> x86_64.c | 319 ++++++++++++++++++++++++++++++++++++++++----- > >>> xen_hyper.c | 2 +- > >>> 14 files changed, 1224 insertions(+), 212 deletions(-) > >>> > -- Crash-utility mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxxxxxx https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/ Contribution Guidelines: https://github.com/crash-utility/crash/wiki