Open pavelkryukov opened 6 years ago
Hello, can i begin with this issue?
Yes!
well, how i can choose this issue in order to prevent assigning of other users to this problem?
or this assigners list is only for information?
Please check e-mail with my answer. In brief: everyone sees that you are doing GDB wiki now, and no one else has to do it now.
I created a page for your future manual: https://github.com/MIPT-ILab/mipt-mips/wiki/GDB
Ivan, you are editing footer instead of the actual page. I moved your data to the page https://github.com/MIPT-ILab/mipt-mips/wiki/GDB. Please use 'edit' button in the top right corner.
GitHub has a cheat sheet for Markdown: https://guides.github.com/features/mastering-markdown/ Use it to make your manual looking great!
But if you are using Windows, you will need to install it. Use the guide below.
It's better to refer to the source page instead of copy-pasting the contents. The installation instruction may be changed in future. Also, there are a lot of systems; for instance, I use WSL and I have no need to install MinGW, some guys are working on Macs.
(Use command "ls -al" to view your directory list. Use "cd 'path'" to change directory)
Let's assume one can use Bash commands. (Otherwise it may end up to something like "type 'l', then type 's', then hit a big key in the bottom of keyboard...).
Open directory with your program file.
Is that step actually required? Also, what do you mean by 'program file'?
Now you must compile your file with GDB
Well. that's not the truth. -g
option adds 'debugging information' to the executable.
Also, it is worth to note how to switch off optimization.
How to build a program to be used by GDB?
For sure, you have to explain how to build a MIPT-MIPS with GDB.
It's better to refer to the source page instead of copy-pasting the contents. The installation instruction may be changed in future. Also, there are a lot of systems; for instance, I use WSL and I have no need to install MinGW, some guys are working on Macs.
It`s okay. But i get this from you. You have explained instructions of installing on two different operating systems here.
Is that step actually required? Also, what do you mean by 'program file'?
.c or .cpp file... Well. I realized that it is better to read more about debugging
You have explained instructions of installing on two different operating systems here.
Thanks, I reduced the paragraph a little.
Well, yes , putting the reference is better, but this means that the whole text in wiki should consist of references only, can you explain main rules to write wiki page?
To my mind, the best guide we have is Smart Pointer Overview. When our project was hosted on GoogleCode, that page hit about 500 visitors per week. Since then, C++11 was released and many more manuals were published...
Sorry for many questions
Let's assume one can use Bash commands. (Otherwise it may end up to something like "type 'l', then type 's', then hit a big key in the bottom of keyboard...).
Can you describe the situation when somebody who works on Linux and doesn't have an access to bash commands.
Can you describe the situation when somebody who works on Linux and doesn't have an access to bash commands.
My point was that everyone should be able to use Bash or any other shell environment.
And on your assumption ... How much time one issue should take?
Under the following circumstances:
my assumption is 1 hour of pure coding process per each point of the task. It's pessimistic, assuming low experience of students.
I would say that the majority of time is spent on points 2 and 3, as well as code review feedbacks.
Completed. Waiting for your comments.
## Main Commands
### Breakpoints
#### How to set up breakpoint
#### Conditional breakpoints
#### Intervals
### Watchpoints
* `catch 'exceptions'` sets a breakpoint when the program responds actively to an exception. The exception can be one of following:
* throw _blah-blah-blah_
* catch _blah-blah-blah_
* `info` _blah-blah-blah_
catch
at all or it woks perfectly for 99% of case? Please refer to the limitation list and try to explain the size of the problem.std::bad_alloc
. What should I do?my_object.my_field
does not work. Ok. Fixed. Waiting for comments
General comment: it is great as a cheat sheet, but I think we need a flow example for each section in following manner:
My examples would be following — feel free to enhance or discuss.
void foo(void * ptr) {
// ...
}
Objective: get into the function if pointer is zero and understand what happens
For sure, you have to explain how to build a MIPT-MIPS with GDB.
I still do not see that point.
It was made with the command ‘bt 3’, so it shows the innermost three frames.
Could you please get an example from our simulator? Also, there is a useful command to jump into a stack frame, please add it.
// You can use info break to list all situations handled by the program.
The '//' is hardly readable. Please, use emphasis or bold to denote importance of expressions.
I apologize for not alerting about missing the lecture yesterday. I confused days.
чт, 11 окт. 2018 г. в 12:08, Pavel I. Kryukov notifications@github.com:
General comment: it is great as a cheat sheet, but I think we need a flow example for each section in following manner:
- Problem: description of what we are going to solve (segfault, unhandled exception etc.)
- Objective: what we are going to do, in general (we are going to set up a breakpoint and see what are the values of variables)
- Implementation: what GDB commands we type to achieve our goal.
My examples would be following — feel free to enhance or discuss.
Breakpoint: consider we have a following function:
void foo(void * ptr) { // ... }
Objective: get into the function if pointer is zero and understand what happens
- Watchpoint: there is a variable, and something writes a zero into it. We need to find what writes zero.
- Exceptions: quite easy, an exception is thrown somewhere, we need to locate
- Backtrace: we have a segmentation fault, and we have to understand where it occured
For sure, you have to explain how to build a MIPT-MIPS with GDB.
I still do not see that point.
It was made with the command ‘bt 3’, so it shows the innermost three frames.
Could you please get an example from our simulator? Also, there is a useful command to jump into a stack frame, please add it.
// You can use info break to list all situations handled by the program.
The '//' is hardly readable. Please, use emphasis or bold to denote importance of expressions.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/MIPT-ILab/mipt-mips/issues/525#issuecomment-428879785, or mute the thread https://github.com/notifications/unsubscribe-auth/Apb4xzkXgtNJQm9DbB4j3lE-Z5MVRYeAks5ujwp7gaJpZM4VlHjF .
hm, can i continue ?
sorry for not alerting about my absence within 2 weeks, i watched all lessons on youtube...
Yes, sure.
Well, and then i will get 1 or 3 points from this issue?
And sorry for question... i have notified that at the last lecture you sad that this term is last for us? Is it true?
I added two points to the table that week. One more will be added once you complete the manual and broadcast the link to our e-mail group.
This term is the last for "software development" track. 2nd term will contain only lectures on computer architecture, once a week each.
I will be absent today too. Some problems...I will watch all videos on YouTube...
вс, 25 нояб. 2018 г., 3:19 Pavel I. Kryukov notifications@github.com:
I added two points to the table that week. One more will be added once you complete the manual and broadcast the link to our e-mail group.
This term is the last for "software development" track. 2nd term will contain only lectures on computer architecture, once a week each.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MIPT-ILab/mipt-mips/issues/525#issuecomment-441405642, or mute the thread https://github.com/notifications/unsubscribe-auth/Apb4x9pZmAVUtER8VZUtN0xt_bvIQHI6ks5uyeH9gaJpZM4VlHjF .
That page desperately needs info about gdbtui.
Since MIPT-V is a TDD project, we discourage using debugger at all.
GNU Debugger (GDB) is a popular tool used for runtime debugging of software. However, MIPT courses are not focused on debugging much. The idea is to have a simple "flight rules" page covering the basic topics:
Feel free to add anything you consider useful.