* tuiRegs.c (tuiDisplayRegistersFrom): Remove unused locals.
(_tuiRegisterFormat, _tuiSetSpecialRegsContent): Likewise. (_tuiSetGeneralAndSpecialRegsContent): Likewise. (_tuiSetFloatRegsContent): Likewise. (_tuiRegisterName): Return a const char*. * tuiData.h (_TuiDataElement): Use const char* for name.
This commit is contained in:
parent
335fc5a319
commit
bc77de56b6
3 changed files with 19 additions and 29 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
|
||||||
|
|
||||||
|
* tuiRegs.c (tuiDisplayRegistersFrom): Remove unused locals.
|
||||||
|
(_tuiRegisterFormat, _tuiSetSpecialRegsContent): Likewise.
|
||||||
|
(_tuiSetGeneralAndSpecialRegsContent): Likewise.
|
||||||
|
(_tuiSetFloatRegsContent): Likewise.
|
||||||
|
(_tuiRegisterName): Return a const char*.
|
||||||
|
* tuiData.h (_TuiDataElement): Use const char* for name.
|
||||||
|
|
||||||
2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
|
2002-08-25 Stephane Carrez <stcarrez@nerim.fr>
|
||||||
|
|
||||||
* tuiSourceWin.h (tuiEraseAllSourceContent): Don't declare.
|
* tuiSourceWin.h (tuiEraseAllSourceContent): Don't declare.
|
||||||
|
|
|
@ -170,7 +170,7 @@ TuiSourceElement, *TuiSourceElementPtr;
|
||||||
/* Elements in the data display window content */
|
/* Elements in the data display window content */
|
||||||
typedef struct _TuiDataElement
|
typedef struct _TuiDataElement
|
||||||
{
|
{
|
||||||
char *name;
|
const char *name;
|
||||||
int itemNo; /* the register number, or data display number */
|
int itemNo; /* the register number, or data display number */
|
||||||
TuiDataType type;
|
TuiDataType type;
|
||||||
Opaque value;
|
Opaque value;
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#include "gdbtypes.h"
|
#include "gdbtypes.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
|
#include "regcache.h"
|
||||||
#include "inferior.h"
|
#include "inferior.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
#include "tuiLayout.h"
|
#include "tuiLayout.h"
|
||||||
|
@ -86,7 +87,7 @@
|
||||||
******************************************/
|
******************************************/
|
||||||
static TuiStatus _tuiSetRegsContent
|
static TuiStatus _tuiSetRegsContent
|
||||||
(int, int, struct frame_info *, TuiRegisterDisplayType, int);
|
(int, int, struct frame_info *, TuiRegisterDisplayType, int);
|
||||||
static char *_tuiRegisterName (int);
|
static const char *_tuiRegisterName (int);
|
||||||
static TuiStatus _tuiGetRegisterRawValue (int, char *, struct frame_info *);
|
static TuiStatus _tuiGetRegisterRawValue (int, char *, struct frame_info *);
|
||||||
static void _tuiSetRegisterElement
|
static void _tuiSetRegisterElement
|
||||||
(int, struct frame_info *, TuiDataElementPtr, int);
|
(int, struct frame_info *, TuiDataElementPtr, int);
|
||||||
|
@ -311,7 +312,7 @@ tuiDisplayRegistersFrom (int startElementNo)
|
||||||
dataWin->detail.dataDisplayInfo.regsContentCount > 0)
|
dataWin->detail.dataDisplayInfo.regsContentCount > 0)
|
||||||
{
|
{
|
||||||
register int i = startElementNo;
|
register int i = startElementNo;
|
||||||
int j, valueCharsWide, charsWide, itemWinWidth, curY, labelWidth;
|
int j, valueCharsWide, itemWinWidth, curY, labelWidth;
|
||||||
enum precision_type precision;
|
enum precision_type precision;
|
||||||
|
|
||||||
precision = (dataWin->detail.dataDisplayInfo.regsDisplayType
|
precision = (dataWin->detail.dataDisplayInfo.regsDisplayType
|
||||||
|
@ -435,8 +436,6 @@ tuiDisplayRegElementAtLine (int startElementNo, int startLineNo)
|
||||||
int
|
int
|
||||||
tuiDisplayRegistersFromLine (int lineNo, int forceDisplay)
|
tuiDisplayRegistersFromLine (int lineNo, int forceDisplay)
|
||||||
{
|
{
|
||||||
int elementNo;
|
|
||||||
|
|
||||||
if (dataWin->detail.dataDisplayInfo.regsContentCount > 0)
|
if (dataWin->detail.dataDisplayInfo.regsContentCount > 0)
|
||||||
{
|
{
|
||||||
int line, elementNo;
|
int line, elementNo;
|
||||||
|
@ -595,7 +594,7 @@ registers.\n",
|
||||||
** _tuiRegisterName().
|
** _tuiRegisterName().
|
||||||
** Return the register name.
|
** Return the register name.
|
||||||
*/
|
*/
|
||||||
static char *
|
static const char *
|
||||||
_tuiRegisterName (int regNum)
|
_tuiRegisterName (int regNum)
|
||||||
{
|
{
|
||||||
return REGISTER_NAME (regNum);
|
return REGISTER_NAME (regNum);
|
||||||
|
@ -622,7 +621,7 @@ _tuiRegisterFormat (char *buf, int bufLen, int regNum,
|
||||||
{
|
{
|
||||||
struct ui_file *stream;
|
struct ui_file *stream;
|
||||||
struct ui_file *old_stdout;
|
struct ui_file *old_stdout;
|
||||||
char *name;
|
const char *name;
|
||||||
struct cleanup *cleanups;
|
struct cleanup *cleanups;
|
||||||
char *p;
|
char *p;
|
||||||
int pos;
|
int pos;
|
||||||
|
@ -701,15 +700,9 @@ static TuiStatus
|
||||||
_tuiSetSpecialRegsContent (int refreshValuesOnly)
|
_tuiSetSpecialRegsContent (int refreshValuesOnly)
|
||||||
{
|
{
|
||||||
TuiStatus ret = TUI_FAILURE;
|
TuiStatus ret = TUI_FAILURE;
|
||||||
int i, endRegNum;
|
int endRegNum;
|
||||||
|
|
||||||
endRegNum = FP0_REGNUM - 1;
|
endRegNum = FP0_REGNUM - 1;
|
||||||
#if 0
|
|
||||||
endRegNum = (-1);
|
|
||||||
for (i = START_SPECIAL_REGS; (i < NUM_REGS && endRegNum < 0); i++)
|
|
||||||
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
|
|
||||||
endRegNum = i - 1;
|
|
||||||
#endif
|
|
||||||
ret = _tuiSetRegsContent (START_SPECIAL_REGS,
|
ret = _tuiSetRegsContent (START_SPECIAL_REGS,
|
||||||
endRegNum,
|
endRegNum,
|
||||||
selected_frame,
|
selected_frame,
|
||||||
|
@ -728,15 +721,9 @@ static TuiStatus
|
||||||
_tuiSetGeneralAndSpecialRegsContent (int refreshValuesOnly)
|
_tuiSetGeneralAndSpecialRegsContent (int refreshValuesOnly)
|
||||||
{
|
{
|
||||||
TuiStatus ret = TUI_FAILURE;
|
TuiStatus ret = TUI_FAILURE;
|
||||||
int i, endRegNum = (-1);
|
int endRegNum = (-1);
|
||||||
|
|
||||||
endRegNum = FP0_REGNUM - 1;
|
endRegNum = FP0_REGNUM - 1;
|
||||||
#if 0
|
|
||||||
endRegNum = (-1);
|
|
||||||
for (i = 0; (i < NUM_REGS && endRegNum < 0); i++)
|
|
||||||
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
|
|
||||||
endRegNum = i - 1;
|
|
||||||
#endif
|
|
||||||
ret = _tuiSetRegsContent (
|
ret = _tuiSetRegsContent (
|
||||||
0, endRegNum, selected_frame, TUI_SPECIAL_REGS, refreshValuesOnly);
|
0, endRegNum, selected_frame, TUI_SPECIAL_REGS, refreshValuesOnly);
|
||||||
|
|
||||||
|
@ -751,15 +738,9 @@ static TuiStatus
|
||||||
_tuiSetFloatRegsContent (TuiRegisterDisplayType dpyType, int refreshValuesOnly)
|
_tuiSetFloatRegsContent (TuiRegisterDisplayType dpyType, int refreshValuesOnly)
|
||||||
{
|
{
|
||||||
TuiStatus ret = TUI_FAILURE;
|
TuiStatus ret = TUI_FAILURE;
|
||||||
int i, startRegNum;
|
int startRegNum;
|
||||||
|
|
||||||
startRegNum = FP0_REGNUM;
|
startRegNum = FP0_REGNUM;
|
||||||
#if 0
|
|
||||||
startRegNum = (-1);
|
|
||||||
for (i = NUM_REGS - 1; (i >= 0 && startRegNum < 0); i--)
|
|
||||||
if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) != TYPE_CODE_FLT)
|
|
||||||
startRegNum = i + 1;
|
|
||||||
#endif
|
|
||||||
ret = _tuiSetRegsContent (startRegNum,
|
ret = _tuiSetRegsContent (startRegNum,
|
||||||
NUM_REGS - 1,
|
NUM_REGS - 1,
|
||||||
selected_frame,
|
selected_frame,
|
||||||
|
|
Loading…
Add table
Reference in a new issue