简体   繁体   English

Solaris:gdb a.out>运行>是否打开子外壳?

[英]Solaris: gdb a.out > run > opens subshell?

Haven't found anything about this. 尚未找到任何有关此的信息。

Trying to learn gdb and I get the feeling I'm doing something wrong. 尝试学习gdb时,我感觉到我做错了事。

I compile the c program with gcc -g program.c -o a.out 我用gcc -g program.c -o a.out编译c程序

then use the command gdb a.out followed with run and this opens a subshell after warning me that it's running. 然后使用命令gdb a.outrun ,然后在警告我它正在运行之后打开一个子外壳。 If I type a.out as a command, then ctrl+d I'll drop back to gdb and get whatever message it wanted to throw at me. 如果我输入a.out作为命令,然后按ctrl+d我将回到gdb并得到它想要扔给我的任何消息。 Without running the a.out after dropping out of the subshell, gdb acts like I didn't do anything at all. 退出子外壳后,如果没有运行a.out ,gdb的行为就像我什么都没做。

All the tutorials I've seen shows that run within gdb will run the loaded program. 我已经看到了节目的所有教程run GDB内将运行加载的程序。 Googling hasn't found me anything. 谷歌搜索还没有找到我任何东西。

Setting breakpoints seems to be ignored as well. 设置断点似乎也被忽略。

What I doing wrong? 我做错了什么?

I'm ridiculous. 真可笑

The default shell is csh on our unix server. 在我们的unix服务器上,默认的shell是csh。 In my .cshrc I have an exec bash at the end of .cshrc to drop csh and load bash. 在我的.cshrc中,我在.cshrc末尾有一个exec bash来删除csh并加载bash。 The gdb output is in csh, and it's causing bash to load. gdb输出在csh中,并导致bash加载。

/derp / derp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM