How to use alias and script to turn DBX commands into other commands of their own habit

Source: Internet
Author: User
Tags dbx linux

Many users just contact ZOS USS DBX, very not accustomed to its command, and Linux gdb is quite different, so feel bad. This article focuses on using the alias command to change the DBX command to its customary name, and then write these alias commands in a DBX-readable default script. Dbxinit or. Dbxsetup directly to operate DBX.

When we first contacted ZOS USS dbx, it was possible to be unfamiliar with its series of command, which was quite different from the Linux GDB command, and therefore felt bad. In fact, DBX provides a very useful command alias, the user can first use the alias command to change the DBX command to their usual name, and then write these alias commands in a DBX can read the default script. Dbxinit or. Dbxsetup, so that you can To manipulate the DBX with his familiar commands. OK, let's take a look at the concrete examples.

For example, the "Stop in FunctionName" and "Stop at" filename ": #line" are two ways to set a breakpoint DBX you can see that it is different from "breakpoint XX" in gdb, especially the way to set line number breakpoints, to memorize these D BX command, change our usage habit is a very headache thing. Here, we use alias and script to change the DBX command to the commands we know in GDB.

1. Before the alias setting, if we want to set a breakpoint in line 12th of the MAIN.C, we see that this is the case:

(dbx64) St at "MAIN.C": 12 # Typing stop at command, setting breakpoint on line 12th

[2] stop at "MAIN.C": 12

2. Now we use the alias to replace the commands in the DBX with our familiar

(1) Write the alias command in the. Dbxinit, for example, we want to replace the stop at command with the command "B"

Alias B "Stop at"

(2) After the alias is written, start dbx, and when we again want to set a breakpoint on line 12th in MAIN.C, the situation is different:

(dbx64) B 12 # You can set a breakpoint on line 12th simply by typing b 12

[1] stop at "MAIN.C": 12

(3) In addition, in the process of debugging a program, we can use the alias to see which commands we have replaced

(dbx64) Alias

J Status

L List

C cont

N Next

M map

E Edit

D Delete

P Print

R Run

Q quit

H Help

t where

S step

X Registers

Mu Mutex

CV condition

Th thread

St Stop

b Stop at # This is what I just set

RWL Readwritelock

Through the above examples, we can see some difficult to remember, unfamiliar command has been changed into a simple, easy to remember the appearance of interest, quickly try it.

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/OS/other/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.