(gdb) b after_post
Breakpoint 1 at 0x80dccfb: file article.c, line 1098.
(gdb) c
Continuing.
Breakpoint 1, after_post (user=0xd057cac0, fh=0x8046a50, boardname=0xd1041680 "test", re=0x0,
poststat=1, session=0x8147900) at article.c:1098
1098 int fd, err = 0, nowid = 0;
(gdb) watch boardname
Watchpoint 2: boardname
(gdb) n
1105 struct boardheader *bh = NULL;
(gdb) n
1108 if ((re == NULL) && (!strncmp(fh->title, "Re: ", 4))) {
(gdb) n
Watchpoint 2 deleted because the program has left the block in
which its expression is valid.
0xd117f790 in strncmp () from /usr/lib/libc.so.1
(gdb) n
Single stepping until exit from function strncmp,
which has no line number information.
after_post (user=0xd057cac0, fh=0x8046a50, boardname=0xd1041680 "test", re=0x0, poststat=1,
session=0x8147900) at article.c:1111
1111 bid = getbid(boardname, &bh);
(gdb) n
1113 setbfile(oldpath, boardname, fh->filename);
(gdb) n
1114 filtered = 0;
(gdb) n
1115 if (strcmp(fh->owner, DELIVER)) {
(gdb) n
1116 if (((bh && bh->level & PERM_POSTMASK) || normal_board(boardname)) && strcmp(boardname, FILTER_BOARD)
(gdb) n
1128 if (check_badword_str(fh->title, strlen(fh->title), session) || check_badword(oldpath, fh->attachment, session))
(gdb) n
1178 setbfile(buf, boardname, DOT_DIR);
(gdb) n
1180 if ((fd = open(buf, O_WRONLY | O_CREAT, 0664)) == -1) {
(gdb) n
1189 for (p = fh->title; *p; p++)
(gdb) n
1190 if (*p == '\x1b')
(gdb) n
1189 for (p = fh->title; *p; p++)
(gdb) n
1190 if (*p == '\x1b')
(gdb) n
1189 for (p = fh->title; *p; p++)
(gdb) n
1190 if (*p == '\x1b')
(gdb) n
1189 for (p = fh->title; *p; p++)
(gdb) n
1190 if (*p == '\x1b')
(gdb) n
1189 for (p = fh->title; *p; p++)
(gdb) n
1193 if (!err) {
(gdb) n
1194 flock(fd, LOCK_EX);
(gdb) n
1195 nowid = get_nextid(boardname);
(gdb) n
1196 fh->id = nowid;
(gdb) n
1197 if (re == NULL) {
(gdb) n
1198 fh->groupid = fh->id;
(gdb) n
1199 fh->reid = fh->id;
(gdb) n
1204 set_posttime(fh);
(gdb) n
1205 lseek(fd, 0, SEEK_END);
(gdb) n
1206 if (safewrite(fd, fh, sizeof(fileheader)) == -1) {
(gdb) n
1210 flock(fd, LOCK_UN);
(gdb) n
1211 close(fd);
(gdb) n
1213 if (err) {
(gdb) n
1223 updatelastpost(boardname);
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
0xd11ab4ee in strncasecmp () from /usr/lib/libc.so.1
【 在 atppp (Big Mouse) 的大作中提到: 】
: 一条条n吧兄弟。。。
--
FROM 220.173.136.*