首页 > 其他分享 >【gdb】启动时不显示提示信息

【gdb】启动时不显示提示信息

时间:2023-10-16 09:23:10浏览次数:35  
标签:show 启动 GDB gdb 提示信息 Type

启动时不显示提示信息

$ gdb
GNU gdb (GDB) 7.7.50.20140228-cvs
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

gdb在启动时会显示如上类似的提示信息。如果不想显示这个信息,则可以使用-q选项把提示信息关掉:

$ gdb -q
(gdb)

你可以在~/.bashrc中,为gdb设置一个别名:

alias gdb="gdb -q"

 

 

参考资料

1. gdb手册

2. 启动时不显示提示信息

标签:show,启动,GDB,gdb,提示信息,Type
From: https://www.cnblogs.com/sunbines/p/17766641.html

相关文章

  • 【gdb】gdb退出时不显示提示信息
    gdb退出时不显示提示信息gdb在退出时会提示:Adebuggingsessionisactive.Inferior1[process29686]willbekilled.Quitanyway?(yorn)n如果不想显示这个信息,则可以在gdb中使用如下命令把提示信息关掉:(gdb)setconfirmoff也可以把这个命令加到.gdbi......
  • 【gdb】只允许一个线程运行
    只允许一个线程运行1.例子:#include<stdio.h>#include<pthread.h>#include<unistd.h>inta=0;intb=0;void*thread1_func(void*p_arg){while(1){a++;sleep(1);}}void*thread2_func(void*p_arg){while(1){b+......
  • 【gdb】调试子进程
    调试子进程1.例子#include<stdio.h>#include<sys/types.h>#include<unistd.h>intmain(void){pid_tpid;pid=fork();if(pid<0){exit(1);}elseif(pid>0){exit(0);}printf("helloworld\n&qu......
  • 【gdb】调试已经运行的进程
     调试已经运行的进程1.例子:#include<stdio.h>#include<pthread.h>void*thread_func(void*p_arg){while(1){printf("%s\n",(char*)p_arg);sleep(10);}}intmain(void){pthread_tt1,t2;pthread_create(&t1,NULL,......
  • 【gdb】让catchpoint只触发一次
    让catchpoint只触发一次1.例子:#include<stdio.h>#include<stdlib.h>#include<sys/types.h>#include<unistd.h>intmain(void){pid_tpid;inti=0;for(i=0;i<2;i++){ pid=fork(); if(pid<0)......
  • 【gdb】打印内存的值
    打印内存的值1.例子#include<stdio.h>intmain(void){inti=0;chara[100];for(i=0;i<sizeof(a);i++){a[i]=i;}return0;}gdb中使用“x”命令来打印内存的值,格式为“x/nfuaddr”......
  • milkv-duo启动流程分析:手动构建fip.bin [2/2]
    手动合成fip.bin和boot.sd[2/2]编译FSBL编译FSBL是为了得到bl2.bin。注意到我们需要配置一些参数:ARCH?=ifneq($(originCROSS_COMPILE),commandline)ifeq($(ARCH),riscv)CROSS_COMPILE:=${CROSS_COMPILE_GLIBC_RISCV64}BOOT_CPU?=riscvelseCROSS_COMPILE:=${......
  • 【gdb】进入和退出图形化调试界面
    进入和退出图形化调试界面1.例子#include<stdio.h>voidfun1(void){inti=0;i++;i=i*2;printf("%d\n",i);}voidfun2(void){intj=0;fun1();j++;j=j*2;print......
  • 轻松掌握组件启动之Redis单机、主从、哨兵、集群配置
    单机配置启动Redis安装下载地址:http://redis.io/download安装步骤:1:安装gcc编译器:yuminstallgcc2:将下载好的redis‐5.0.3.tar.gz文件放置在/usr/local文件夹下,并解压redis‐5.0.3.tar.gz文件wgethttp://download.redis.io/releases/redis‐5.0.3.tar.gztarxzfredis......
  • 【gdb】打印数组的索引下标
    打印数组的索引下标1.例子#include<stdio.h>intnum[10]={1<<0,1<<1,1<<2,1<<3,1<<4,1<<5,1<<6,1<<7,1<<8,1<<9};intmain(void){inti;for......