Error whenever I try to debug

Sysprogs forums Forums VisualKernel Error whenever I try to debug

This topic contains 8 replies, has 2 voices, and was last updated by  Anonymous 5 years, 7 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #751

    Anonymous
    Participant

    I’m trying to use the trial of visualkernel. I follow the tutorial and whenever I try to debug I get an error message saying that ‘debugging could not be started due to the following error: illegal characters in path.’ I am debugging a kernel module on a vmware image. I don’t see any documentation of this issue.

    #2984

    support
    Keymaster

    Hi,

    Are you using a single-machine or a two-machine setup? What directory have you selected to store the kernel cache?
    Could you please enable the verbose mode (Tools->Options->VisualKernel), try debugging again and see if the Launcher Output (in the Output window in VS) contains any additional information such as command line that VisualKernel tries to run?

    #2985

    Anonymous
    Participant

    Single machine setup, my kernel cache is in c:KernelCache. The Launcher Output reads

    VisualKernel: Executing predebug actions
    VisualKernel: Executing predebug actions

    #2986

    Anonymous
    Participant

    I also get this when I try to create a new kernel module. I probably should have mentioned it earlier but I am working with version 3.5.0 of the kernel (not my choice).

    Tool arguments:
    make: Entering directory /usr/src/linux-headers-3.5.0-21-generic’
    test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
    echo;
    echo ” ERROR: Kernel configuration is invalid.”;
    echo ” include/generated/autoconf.h or include/config/auto.conf are missing.”;
    echo ” Run ‘make oldconfig && make prepare’ on kernel src to fix it.”;
    echo;
    /bin/false)
    mkdir -p /tmp/VisualGDB-de7f256d-cdbd-4f9c-becf-92a407b32497/.tmp_versions ; rm -f /tmp/VisualGDB-de7f256d-cdbd-4f9c-becf-92a407b32497/.tmp_versions/*
    make -f scripts/Makefile.build obj=/tmp/VisualGDB-de7f256d-cdbd-4f9c-becf-92a407b32497
    (cat /dev/null; ) > /tmp/VisualGDB-de7f256d-cdbd-4f9c-becf-92a407b32497/modules.order
    make -f /usr/src/linux-headers-3.5.0-21-generic/scripts/Makefile.modpost
    scripts/mod/modpost -m -a -i /usr/src/linux-headers-3.5.0-21-generic/Module.symvers -I /tmp/VisualGDB-de7f256d-cdbd-4f9c-becf-92a407b32497/Module.symvers -o /tmp/VisualGDB-de7f256d-cdbd-4f9c-becf-92a407b32497/Module.symvers -S -w -s
    make: Leaving directory
    /usr/src/linux-headers-3.5.0-21-generic’
    /usr/src/linux-headers-3.5.0-21-generic/scripts/gcc-goto.sh: line 5: cannot create temp file for here-document: No space left on device

    #2987

    support
    Keymaster

    Hi,

    Based on your log it looks like you are out of free space on your Linux machine. Note that the kernel sources and symbols need several gigabytes of space. Could you please try freeing up some space (e.g. adding another virtual disk and mounting /usr/src there)? Does it solve the problem? You can check your free space on Linux using the ‘df -h’ command.

    #2982

    Anonymous
    Participant

    That fixed creating a new one, I decided to create a new module opposed to importing one so the previous issue is probably moot (likely me not doing something correctly). Now I can’t build anything, I try building the basic “hello world” module and get

    Error 1 error : size of unnamed array is negative c:Usersdandocumentsvisualstudio2013ProjectsLinuxKernelModule3LinuxKernelModule3includelinuxrcupdate.h LinuxKernelModule3
    Error 2 error MSB3073: The command “”C:Program Files (x86)SysprogsVisualKernel\VisualKernel.exe” /build “c:Usersdandocumentsvisualstudio2013ProjectsLinuxKernelModule3LinuxKernelModule3LinuxKernelModule3.vcxproj” “/solution:c:usersdandocumentsvisualstudio2013ProjectsLinuxKernelModule3LinuxKernelModule3.sln” “/config:Debug” “/platform:Win32″” exited with code 1. C:Program Files (x86)MSBuildMicrosoft.Cppv4.0V120Microsoft.MakeFile.Targets 38 5 LinuxKernelModule3

    #2983

    Anonymous
    Participant

    I fixed the above error, digging though some mailing lists others noted (in different contexts) that having the -O0 flag present causes this and the -O2 apparent works. It did. Now I get the following

    Failed to start debugging session, GDB has reported the following error: cannot determine GDB stub port for virtual machine …. Please build your project first. If this does not help, check GDB startup parameters in VisualKernel project settings.

    The GDB interaction reads

    Your VisualKernel trial expires in 29 days!
    C:Program Files (x86)SysprogsVisualKernelKernelToolsamd64x86_64-linux-gnu-gdb.exe –interpreter mi
    -file-exec-and-symbols “c:\KernelCache\3.5.0-21-generic_0.kernel\vmlinux-3.5.0-21-generic”
    =thread-group-added,id=”i1″
    GNU gdb (GDB) 7.7
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later < [snip]>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type “show copying”
    and “show warranty” for details.
    This GDB was configured as “–host=i686-pc-mingw32 –target=x86_64-linux-gnu”.
    Type “show configuration” for configuration details.
    For bug reporting instructions, please see:
    < [snip]>.
    Find the GDB manual and other documentation resources online at:
    < [snip]>.
    For help, type “help”.
    Type “apropos word” to search for commands related to “word”.
    OK
    -list-features
    ^done,features=[“frozen-varobjs”,”pending-breakpoints”,”thread-info”,”data-read-memory-bytes”,”breakpoint-notifications”,”ada-task-info”,”language-option”,”info-gdb-mi-command”,”undefined-command-error-code”,”exec-run-start-option”]
    -gdb-set stop-on-solib-events 1
    OK
    -data-list-register-names
    ^done,register-names=[“rax”,”rbx”,”rcx”,”rdx”,”rsi”,”rdi”,”rbp”,”rsp”,”r8″,”r9″,”r10″,”r11″,”r12″,”r13″,”r14″,”r15″,”rip”,”eflags”,”cs”,”ss”,”ds”,”es”,”fs”,”gs”,”st0″,”st1″,”st2″,”st3″,”st4″,”st5″,”st6″,”st7″,”fctrl”,”fstat”,”ftag”,”fiseg”,”fioff”,”foseg”,”fooff”,”fop”,”xmm0″,”xmm1″,”xmm2″,”xmm3″,”xmm4″,”xmm5″,”xmm6″,”xmm7″,”xmm8″,”xmm9″,”xmm10″,”xmm11″,”xmm12″,”xmm13″,”xmm14″,”xmm15″,”mxcsr”,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,””,”orig_rax”,”al”,”bl”,”cl”,”dl”,”sil”,”dil”,”bpl”,”spl”,”r8l”,”r9l”,”r10l”,”r11l”,”r12l”,”r13l”,”r14l”,”r15l”,”ah”,”bh”,”ch”,”dh”,”ax”,”bx”,”cx”,”dx”,”si”,”di”,”bp”,””,”r8w”,”r9w”,”r10w”,”r11w”,”r12w”,”r13w”,”r14w”,”r15w”,”eax”,”ebx”,”ecx”,”edx”,”esi”,”edi”,”ebp”,”esp”,”r8d”,”r9d”,”r10d”,”r11d”,”r12d”,”r13d”,”r14d”,”r15d”]
    -gdb-set disassembly-flavor intel
    OK
    -gdb-set print demangle off
    OK
    -gdb-version
    GNU gdb (GDB) 7.7
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later < [snip]>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law. Type “show copying”
    and “show warranty” for details.
    This GDB was configured as “–host=i686-pc-mingw32 –target=x86_64-linux-gnu”.
    Type “show configuration” for configuration details.
    For bug reporting instructions, please see:
    < [snip]>.
    Find the GDB manual and other documentation resources online at:
    < [snip]>.
    For help, type “help”.
    Type “apropos word” to search for commands related to “word”.
    OK
    info target
    &”info targetn”
    Symbols from “c:KernelCache3.5.0-21-generic_0.kernelvmlinux-3.5.0-21-generic”.
    Local exec file:
    `c:KernelCache3.5.0-21-generic_0.kernelvmlinux-3.5.0-21-generic’, file type elf64-x86-64.
    &”warning: Cannot find section for the entry point of c:\KernelCache\3.5.0-21-generic_0.kernel\vmlinux-3.5.0-21-generic.n”
    Entry point: 0x1000000
    0xffffffff81000000 – 0xffffffff8168f9c2 is .text
    0xffffffff8168f9c4 – 0xffffffff8168fb40 is .notes
    0xffffffff8168fb40 – 0xffffffff81691bb8 is __ex_table
    0xffffffff81800000 – 0xffffffff81a9236e is .rodata
    0xffffffff81a92370 – 0xffffffff81a99f3c is __bug_table
    0xffffffff81a99f40 – 0xffffffff81a9c8e0 is .pci_fixup
    0xffffffff81a9c8e0 – 0xffffffff81a9ca00 is .builtin_fw
    0xffffffff81a9ca00 – 0xffffffff81a9cb10 is .rio_ops
    0xffffffff81a9cb10 – 0xffffffff81a9cb4c is .tracedata
    0xffffffff81a9cb50 – 0xffffffff81aac100 is __ksymtab
    0xffffffff81aac100 – 0xffffffff81ab6a20 is __ksymtab_gpl
    0xffffffff81ab6a20 – 0xffffffff81abe4f8 is __kcrctab
    0xffffffff81abe4f8 – 0xffffffff81ac3988 is __kcrctab_gpl
    0xffffffff81ac3988 – 0xffffffff81ae1841 is __ksymtab_strings
    0xffffffff81ae1860 – 0xffffffff81ae5e50 is __init_rodata
    0xffffffff81ae5e50 – 0xffffffff81ae7850 is __param
    0xffffffff81ae7850 – 0xffffffff81ae8000 is __modver
    0xffffffff81c00000 – 0xffffffff81cdcb00 is .data
    0xffffffff81cdd000 – 0xffffffff81cdd0e8 is .vvar
    0x0000000000000000 – 0x0000000000014680 is .data..percpu
    0xffffffff81cf3000 – 0xffffffff81d3a892 is .init.text
    0xffffffff81d3b000 – 0xffffffff81da9fa0 is .init.data
    0xffffffff81da9fa0 – 0xffffffff81da9fb8 is .x86_cpu_dev.init
    0xffffffff81da9fb8 – 0xffffffff81dc3194 is .parainstructions
    0xffffffff81dc3198 – 0xffffffff81dc3ca8 is .altinstructions
    0xffffffff81dc3ca8 – 0xffffffff81dc412a is .altinstr_replacement
    0xffffffff81dc4130 – 0xffffffff81dc4248 is .iommu_table
    0xffffffff81dc4248 – 0xffffffff81dc4270 is .apicdrivers
    0xffffffff81dc4270 – 0xffffffff81dc622c is .exit.text
    0xffffffff81dc7000 – 0xffffffff81dcd000 is .smp_locks
    0xffffffff81dcd000 – 0xffffffff81dce000 is .data_nosave
    0xffffffff81dce000 – 0xffffffff81f2f000 is .bss
    0xffffffff81f2f000 – 0xffffffff82350000 is .brk
    OK

    #2988

    support
    Keymaster

    Hi,

    It looks like VisualKernel fails to detect the port used by your VMWare stub. Which VMWare version are you using? If it’s an old one, it may have bugs related to the VM control API that VisualKernel is relying on.
    Does VisualKernel show the “suspending VM/configuring VM/resuming VM” window?
    Does your VMX file contain the following lines? (VisualKernel should add them if they are missing)

    If not, please try adding them manually and suspending/resuming the VM.

    Does your vmware.log file contain lines similar to the following?

    If not, please send us your vmware.log file.

    #2989

    Anonymous
    Participant

    I had to finish the assignment without debugging features, I’ll never have to use that platform again. I’m able to do all this just fine on a new version of Ubuntu so the issues are unimportant now.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.