"====================================================================
" Start vundle
"====================================================================
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
"===============================================================
" Write your plugins here
"===============================================================
Plugin 'Yggdroot/indentLine'
"====================================================================
" Run vundle
"====================================================================
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
find : Query for a pattern (Usage: find c|d|e|f|g|i|s|t name)
c: Find functions calling this function
d: Find functions called by this function
e: Find this egrep pattern
f: Find this file
g: Find this definition
i: Find files #including this file
s: Find this C symbol
t: Find this text string
"====================================================================
" Trinity Settings
"====================================================================
" Open and close all the three plugins on the same time
nmap <F8> :TrinityToggleAll<CR>
" Open and close the Source Explorer separately
nmap <F9> :TrinityToggleSourceExplorer<CR>
" Open and close the Taglist separately
nmap <F10> :TrinityToggleTagList<CR>
" Open and close the NERD Tree separately
nmap <F11> :TrinityToggleNERDTree<CR>
"====================================================================
" Tagbar Settings
"====================================================================
" Open and close the tagbar separately
nmap <F7> :TagbarToggle<CR>
"====================================================================
" Start vundle
"====================================================================
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
"===============================================================
" Write your plugins here
"===============================================================
" Layouts
Plugin 'Yggdroot/indentLine'
Plugin 'ntpeters/vim-better-whitespace'
" Markdown
Plugin 'vim-pandoc/vim-pandoc-syntax'
" Python related
Plugin 'python-mode/python-mode'
Plugin 'vim-scripts/indentpython.vim'
Plugin 'vim-syntastic/syntastic'
Plugin 'vim-scripts/python_match.vim'
Plugin 'vim-scripts/python.vim'
" Misc tools
Plugin 'kien/ctrlp.vim'
Plugin 'vim-airline/vim-airline'
Plugin 'tpope/vim-fugitive'
Plugin 'Valloric/YouCompleteMe'
Plugin 'chazy/cscope_maps'
Plugin 'vim-scripts/taglist.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'wesleyche/SrcExpl'
Plugin 'wesleyche/Trinity'
Plugin 'majutsushi/tagbar'
"====================================================================
" Run vundle
"====================================================================
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line
"====================================================================
" Tagbar Settings
"====================================================================
" Open and close the tagbar separately
nmap <F7> :TagbarToggle<CR>
"====================================================================
" Trinity Settings
"====================================================================
" Open and close all the three plugins on the same time
nmap <F8> :TrinityToggleAll<CR>
" Open and close the Source Explorer separately
nmap <F9> :TrinityToggleSourceExplorer<CR>
" Open and close the Taglist separately
nmap <F10> :TrinityToggleTagList<CR>
" Open and close the NERD Tree separately
nmap <F11> :TrinityToggleNERDTree<CR>
"====================================================================
" Airline settings
"====================================================================
let g:airline_powerline_fonts = 1
set laststatus=2
"====================================================================
" syntastic settings
"====================================================================
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:loaded_syntastic_c_checker = 1
let g:loaded_syntastic_cpp_checker = 1
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
autocmd VimEnter * SyntasticToggleMode " disable syntastic by default
"====================================================================
" pymode settings
"====================================================================
let g:pymode_lint = 1 " Prefer to use syntastic to check lint
let g:pymode_folding = 0 " Unfold all
"====================================================================
" Editor and display Settings
"====================================================================
colorscheme koehler " Color for gvim
set hlsearch " Highlight search
set guifont=Inconsolata\ for\ Powerline\ 32 " Font
set cursorline " Hight background at current cursor line
set nu " Display line numbers
" Set background color at colum 80
set colorcolumn=80
highlight ColorColumn guibg=#202020
" Show tabs
set listchars=tab:\|.
set list
" Ensure syntax is on
syntax on
"====================================================================
" Indent Settings
"====================================================================
" Tabs
set ts=4
set expandtab
set shiftwidth=4
" visual indent shift
vnoremap < <gv
vnoremap > >gv
"====================================================================
" MISC Settings
"====================================================================
" Shared unamed regitered with primary selection
set clipboard+=unnamed
" uft-8 encoding: https://stackoverflow.com/questions/16507777/set-encoding-and-fileencoding-to-utf-8-in-vim
set encoding=utf-8
set fileencoding=utf-8
"====================================================================
" Python Settings
"====================================================================
au BufNewFile,BufRead *.py
\ set tabstop=4 |
\ set softtabstop=4 |
\ set shiftwidth=4 |
\ set textwidth=79 |
\ set expandtab |
\ set autoindent |
\ set fileformat=unix
let python_highlight_all=1
"====================================================================
" pandoc Settings
"====================================================================
" Disable autoconeal for markdown
augroup pandoc_syntax
au! BufNewFile,BufFilePre,BufRead *.md set filetype=markdown.pandoc
au! BufNewFile,BufFilePre,BufRead *.markdown set filetype=markdown.pandoc
augroup END
let g:pandoc#syntax#conceal#use = 0
"====================================================================
" YCM Settings
"====================================================================
let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/.ycm_extra_conf.py'
let g:ycm_show_diagnostics_ui = 0
"====================================================================
" Console tab setting:
" Ref https://superuser.com/questions/410982/in-vim-how-can-i-quickly-switch-between-tabs
"====================================================================
nnoremap <S-Left> :tabprevious<CR>
nnoremap <S-Right> :tabnext<CR>
0x0000000000000000 in irq_stack_union ()
(gdb) b x86_64_start_kernel
Breakpoint 1 at 0xffffffff8188429b: file arch/x86/kernel/head64.c, line 134.
(gdb) c
Continuing.
Remote 'g' packet reply is too long: 9b428881ffffffff0000000000000000010100c000000000ffffffff00000000804001000000000080400100000000000000000000000000f03f8081ffffffff00a080010000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000009b428881ffffffff4600000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000
Reading symbols from ./vmlinux...done.
Remote debugging using localhost:1234
0x0000000000000000 in irq_stack_union ()
Breakpoint 1 at 0xffffffff8188429b: file arch/x86/kernel/head64.c, line 134.
Continuing.
Remote 'g' packet reply is too long: 9b428881ffffffff0000000000000000010100c000000000ffffffff00000000804001000000000080400100000000000000000000000000f03f8081ffffffff00a080010000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000009b428881ffffffff4600000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000
Ending remote debugging.
The target architecture is assumed to be i386:x86-64:intel
Remote debugging using localhost:1234
x86_64_start_kernel (real_mode_data=0x14080 <cpu_tss+6848> <error: Cannot access memory at address 0x14080>) at arch/x86/kernel/head64.c:134
134 {
(gdb) n
151 cr4_init_shadow();
# Put a getty on the serial port
tty1::respawn:/sbin/getty -L tty1 0 vt100 # GENERIC_SERIAL
+ttyS0::respawn:/sbin/getty -L ttyS0 0 vt100 # GENERIC_SERIAL
$ arm-none-eabi-gdb --version
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160923-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl
...
$ arm-none-eabi-gdb -ex "file ./vmlinux" -ex "target remote :1234"
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160923-cvs
...
Reading symbols from ./vmlinux...done.
Remote debugging using :1234
0x60000000 in ?? ()
(gdb) b printk
Breakpoint 1 at 0x800a2260: file kernel/printk/printk.c, line 1900.
(gdb) c
Continuing.
Breakpoint 1, printk (fmt=0x0 <__vectors_start>) at kernel/printk/printk.c:1900
1900 {
(gdb) bt
#0 printk (fmt=0x0 <__vectors_start>) at kernel/printk/printk.c:1900
#1 0x806178e0 in start_kernel () at init/main.c:508
#2 0x6000807c in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
$ arm-none-eabi-gdb --version
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160923-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl
...
$ arm-none-eabi-gdb ./vmlinux -ex "target remote :1234"
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160923-cvs
...
Reading symbols from ./vmlinux...done.
Remote debugging using :1234
__vectors_start () at arch/arm/kernel/entry-armv.S:1210
1210 W(b) vector_rst
(gdb) b printk
Breakpoint 1 at 0xc0069df4: file kernel/printk/printk.c, line 1900.
(gdb) c
Continuing.
Breakpoint 1, printk (fmt=0x0 <__vectors_start>) at kernel/printk/printk.c:1900
1900 {
(gdb) bt
#0 printk (fmt=0x0 <__vectors_start>) at kernel/printk/printk.c:1900
#1 0xc039d8c4 in start_kernel () at init/main.c:508
#2 0x00008048 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)